diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-10-12 04:05:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-10-12 04:05:44 +0000 |
commit | dfd2257ad98eb0f6eab167e5fe5ff68ca87172e3 (patch) | |
tree | 598abc70247c1d029e6ac2ddb8cf127b81e442e4 /sysdeps/unix/sysv/linux | |
parent | a5a0310d8e9d7176bb17e91c916272006a871016 (diff) | |
download | glibc-dfd2257ad98eb0f6eab167e5fe5ff68ca87172e3.tar.gz glibc-dfd2257ad98eb0f6eab167e5fe5ff68ca87172e3.tar.xz glibc-dfd2257ad98eb0f6eab167e5fe5ff68ca87172e3.zip |
Update. cvs/libc-ud-971011
1997-10-12 05:09 Ulrich Drepper <drepper@cygnus.com> * libio/Makefile (routines): Remove iofprintf. * stdio-common/fprintf.c [USE_IN_LIBIO]: Define _IO_fprintf. * libio/filedoalloc.c: Use _G_stat64 instead of stat. * libio/fileops.c (_IO_file_open): Change to take extra argument indicating whether 32 or 64 bit mode is wanted. * libio/iofopen.c: Call _IO_file_open with extra argument set to 0. * libio/iofopen64.c: Call _IO_file_open with extra argument set to 0. * libio/iolibio.h (_IO_freopen, _IO_freopen64): Likewise. * libio/iofgetpos.c: Pretty print. * libio/iofgetpos64.c: Use _IO_fpos64_t for local variable `pos'. * manual/conf.texi: Document all the _SC_ and _CS_ constants. * manual/creature.texi: Document _LARGEFILE_SOURCE, _LARGEFILE64_SOURCE and _FILE_OFFSET_BITS. * manual/llio.texi: Document truncate and ftruncate. * manual/stdio.texi: Document positional parameters for printf. * math/Makefile (headers): Add tgmath.h. (libm-support): Remove s_lrint, s_llrint, s_lround, and s_llround and move to ... (libm-calls): ... here. Add scalbln, s_nextafterx and s_fma. * math/libm-test.c (lround_test, llround_test): Test for all FP formats by using FUNC(). * math/libm.map: Add fma, fmaf, fmal, nextafterx, nextafterxf, nextafterxl, scalbln, scalblnf, scalblnl, lrintf, lrintl, llrintf, llrintl, lroundf, lroundl, llroundf, and llroundl. * math/math.h: Document new platform specific macros from mathdef.h. Remove declaration of lrint, llrint, lround, and llround. * math/test-double.c: Define TEST_DOUBLE. * math/test-idouble.c: Likewise. * math/test-float.c: Define TEST_FLOAT. * math/test-ifloat.c: Likewise. * math/tgmath.h: New file. * math/bits/mathcalls.h: Add nextafterx, scalbln, fma, lrint, llrint, lround, and llround. Change second argument of scalbn to `int'. * sysdeps/libm-ieee754/s_fma.S: New file. * sysdeps/libm-ieee754/s_fmaf.S: New file. * sysdeps/libm-ieee754/s_fmal.S: New file. * sysdeps/libm-i387/s_fma.S: New file. * sysdeps/libm-i387/s_fmaf.S: New file. * sysdeps/libm-i387/s_fmal.S: New file. * sysdeps/libm-i387/s_llrint.S: Change to take double argument. * sysdeps/libm-i387/s_lrint.S: Likewise. * sysdeps/libm-i387/s_llrintf.S: New file. * sysdeps/libm-i387/s_llrintl.S: New file. * sysdeps/libm-i387/s_lrintf.S: New file. * sysdeps/libm-i387/s_lrintl.S: New file. * sysdeps/libm-ieee754/s_llrint.c: Remove version which works on 80bit double. * sysdeps/libm-ieee754/s_lrint.c: Likewise. * sysdeps/libm-ieee754/s_llrintf.S: New file. * sysdeps/libm-ieee754/s_llrintl.S: New file. * sysdeps/libm-ieee754/s_lrintf.S: New file. * sysdeps/libm-ieee754/s_lrintl.S: New file. * sysdeps/libm-i387/s_scalbln.c: New file. Empty file. * sysdeps/libm-i387/s_scalblnf.c: New file. Empty file. * sysdeps/libm-i387/s_scalblnl.c: New file. Empty file. * sysdeps/libm-i387/s_scalbn.c: Add scalbln as alias. * sysdeps/libm-i387/s_scalbnf.c: Add scalblnf as alias. * sysdeps/libm-i387/s_scalbnl.c: Add scalblnl as alias. * sysdeps/libm-ieee754/s_llround.c: Remove version which works on 80bit double. * sysdeps/libm-ieee754/s_lround.c: Likewise. * sysdeps/libm-ieee754/s_llroundf.c: Likewise. * sysdeps/libm-ieee754/s_llroundl.c: Likewise. * sysdeps/libm-ieee754/s_lroundf.c: Likewise. * sysdeps/libm-ieee754/s_lroundl.c: Likewise. * sysdeps/libm-ieee754/s_nextafterl.c: Add alias fo nextafterxl. * sysdeps/libm-ieee754/s_nextafterx.c: New file. * sysdeps/libm-ieee754/s_nextafterxf.c: New file. * sysdeps/libm-ieee754/s_nextafterxl.c: New file. * sysdeps/libm-ieee754/s_scalbln.c: New file. * sysdeps/libm-ieee754/s_scalblnf.c: New file. * sysdeps/libm-ieee754/s_scalblnl.c: New file. * sysdeps/libm-ieee754/s_scalbn.c: Change to take `int' as second arg. * sysdeps/libm-ieee754/s_scalbnf.c: Likewise. * sysdeps/libm-ieee754/s_scalbnl.c: Likewise. * stdlib/stdlib.h: Protect declarations of __strto*l_internal functions by #ifdefs since they are duplicated in inttypes.h. * sysdeps/wordsize-32/inttypes.h: Add definition of strtoimax and strtoumax plus needed declarations. * sysdeps/generic/confname.h (_SC_AIO_LISTIO_MAX): Fix typo. 1997-10-09 Andreas Jaeger <aj@arthur.rhein-neckar.de> * locale/programs/locfile.c (locfile_read): Correct while loop. * db2/makedb.c (main): Add missing parameter for error output. (process_input): Likewise. * resolv/gethnamaddr.c (getanswer): Rewrite a bit to avoid warning. 1997-10-12 05:05 Ulrich Drepper <drepper@cygnus.com> * libc-map: Add __bzero, __mempcpy. 1997-10-10 18:51 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/unix/sysv/linux/sparc/bits/ioctls.h: Remove dependencies on kernel_termios.h 1997-10-09 10:24 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> Add the changes from the Solaris 2.6 header files, use the new public defines/functions. * nis/nis_addmember.c: Updated. * nis/nis_checkpoint.c: Updated. * nis/nis_creategroup.c: updated. * nis/nis_destroygroup.c: Updated. * nis/nis_getservlist.c: Updated. * nis/nis_ismember.c: Updated. * nis/nis_lookup.c: Updated. * nis/nis_modify.c: Updated. * nis/nis_ping.c: Updated. * nis/nis_print.c: Updated. * nis/nis_print_group_entry.c: Updated. * nis/nis_remove.c: Updated. * nis/nis_removemember.c: Updated. * nis/nis_xdr.c: Updated. * nis/nss_nisplus/nisplus-alias.c: Updated. * nis/nss_nisplus/nisplus-ethers.c: Updated. * nis/nss_nisplus/nisplus-hosts.c: Updated. * nis/nss_nisplus/nisplus-network.c: Updated. * nis/nss_nisplus/nisplus-parser.c: Updated. * nis/nss_nisplus/nisplus-proto.c: Updated. * nis/nss_nisplus/nisplus-rpc.c: Updated. * nis/nss_nisplus/nisplus-service.c: Updated. * nis/rpcsvc/nis.h: Updated. * nis/rpcsvc/nis.x: Updated. * nis/rpcsvc/nis_object.x: Updated. * nis/rpcsvc/nis_tags.h: Updated. * nis/rpcsvc/nislib.h: Updated. * nis/lckcache.c: Removed, since Sun has dropped the directory signatures. The old cache version is now a security risk and not longer supported by Sun. * nis/nis_cache.c: Likewise. * nis/rpcsvc/nis_cache.h: Likewise. * nis/rpcsvc/nis_cache.x: Likewise. * nis/nis_call.c: Remove calls to the cache functions. * nis/libnsl.map: Remove cache and depending functions. * nis/nis_intern.h: Likewise. * nis/nis_add.c: Remove #include <rpcsvc/nislib.h>. * nis/nis_domain_of.c: Likewise. * nis/nis_domain_of_r.c: Likewise. * nis/nis_error.c: Likewise. * nis/nis_file.c: Likewise. * nis/nis_local_names.c: Likewise. * nis/nis_mkdir.c: Likewise. * nis/nis_rmdir.c: Likewise. * nis/nis_subr.c: Likewise. * nis/nis_verifygroup.c: Likewise. * nis/nis_clone.c: Removed, replaced by ... * nis/nis_clone_dir.c: New. * nis/nis_clone_obj.c: New. * nis/nis_clone_res.c: New. * nis/nis_table.c: Fixed bugs shown through the new clone functions. * nis/nis_defaults.c: Fixed a lot of race conditions. * nis/nis_free.c: Rewritten. * sunrpc/auth_des.c: Fix use of free'ed pointer. * nis/Makefile (libnsl-routines): Remove nis_clone, nis_cache and lckcache. Add nis_clone_dir, nis_clone_obj, and nis_clone_res. 1997-10-09 Andreas Jaeger <aj@arthur.rhein-neckar.de> * wctype/test_wctype.c (TEST): Add parens to avoid ambiguity. 1997-10-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * include/features.h: Don't crash if _XOPEN_SOURCE is defined to be empty. 1997-10-09 05:54 Ulrich Drepper <drepper@cygnus.com> * nss/digits_dots.c: Place `result' in resbuf and not in `buffer'. * nss/getXXbyYY_r.c: Make sure digits_dots.c sees `resbuf' as struct and not a pointer. Little optimizations. 1997-10-09 05:00 Ulrich Drepper <drepper@cygnus.com> * sysdeps/stub/getenv.c: Remove unused file. * sysdeps/stub/lxstat.c: Likewise. * sysdeps/stub/morecore.c: Likewise. * sysdeps/stub/putenv.c: Likewise. * sysdeps/stub/sbrk.c: Likewise. * sysdeps/stub/setenv.c: Likewise. * sysdeps/stub/sysd-stdio.c: Likewise. * sysdeps/stub/sysdep.h: Likewise. Reported by Zack Weinberg <zack@rabi.phys.columbia.edu>. 1997-10-09 04:58 Ulrich Drepper <drepper@cygnus.com> * configure.in: Add __bzero definition to DWARF2 unwind test. Reported by David S. Miller <davem@caip.rutgers.edu>. 1997-10-07 Paul Eggert <eggert@twinsun.com> * intl/loadmsgcat.c (_nl_load_domain): Fix &&/|| typo when checking file size. Check for overflow when stuffing off_t into size_t. 1997-10-07 18:11 Ulrich Drepper <drepper@cygnus.com> * time/africa: Update from tzdata1997i. 1997-10-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * posix/globtest.sh: Add arguments for name of dynamic linker and call dynamic linker to execute globtest. * posix/Makefile (tests): Supply arguments to globtest.sh. 1997-10-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nis/rpcsvc/ypupd.h: Add missing __END_DECLS. 1997-10-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libc.map: Add mempcpy, prctl. 1997-09-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/memcmp.c: Avoid warnings. * sysdeps/generic/memset.c: Likewise. * sysdeps/generic/strchr.c: Likewise. * sysdeps/generic/strlen.c: Likewise. 1997-09-29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * malloc/Makefile ($(objpfx)mtrace): Fix typo. 1997-09-29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/dl-machine.h (elf_machine_rela): Fix last change. The R_68K_GLOB_DAT and R_68K_JMP_SLOT relocations really ignore the addend, Richard. (elf_machine_fixup_plt): Don't add the addend. (elf_machine_plt_value): New function. * sysdeps/alpha/dl-machine.h (elf_machine_plt_value): New function. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_plt_value): New function. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_plt_value): New function. * sysdeps/powerpc/dl-machine.h (elf_machine_plt_value): New function. * sysdeps/i386/dl-machine.h (elf_machine_plt_value): New function. * elf/dl-runtime.c (fixup, profile_fixup): Don't add in the addend, instead let the machine dependent setup decide. 1997-09-20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/m68020/bits/string.h: New file. 1997-10-07 04:27 Richard Henderson <rth@cygnus.com> * Makeconfig (+includes): Add -I$(objpfx). * stdlib/longlong.h [__sparc__]: Prototype __udiv_qrnnd. * sysdeps/alpha/setjmp.S: __setjmp is the same as _setjmp. Make the former a strong symbol and the later a weak alias. * sysdeps/sparc/sparc32/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. 1997-10-06 21:01 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Make ino_t 64-bits. * sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h: Make st_ino member 64-bits as well, to match the kernel. 1997-10-06 19:35 Ulrich Drepper <drepper@cygnus.com> * sysdeps/sparc/sparc64/sub_n.S: Fix typo. Patch by Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>. 1997-10-06 01:09 Zack Weinberg <zack@rabi.phys.columbia.edu> * time/README: Correct list of files from tzcode package. Add contact information for tzcode/tzdata maintainers. Correct spelling of author's name. Compact lists. 1997-10-06 01:48 Ulrich Drepper <drepper@cygnus.com> * malloc/malloc.h: Remove hook definition without caller argument. * malloc/malloc.c: Likewise. * string/tester.c: Correct strsep test. * string/bits/string2.h: Define __string2_1bptr_p and use it. Patch by David S. Miller <davem@tanya.rutgers.edu>. * math/Makefile (routines): Add s_clog10. * math/libm-test.c: Add test for clog10. * math/libm.map: Add clog10{,f,l}. * math/bits/cmathcalls.h [__USE_GNU]: Add clog10. * sysdeps/libm-ieee754/s_clog10.c: New file. * sysdeps/libm-ieee754/s_clog10f.c: New file. * sysdeps/libm-ieee754/s_clog10l.c: New file. * manual/math.texi: Describe clog10. * config.h.in: Add USE_REGPARMS and define internal_function based on this. * configure.in: Define USE_REGPARMS for ix86 machines. * gmon/gmon.c: Mark write_hist, write_call_graph and write_bb_counts as internal functions. * inet/getnameinfo.c: Likewise for nrl_domainname. * inet/getnetgrent_r.c: Likewise for __internal_setnetgrent_reuse. * inet/rcmd.c: Likewise for __icheckhost. * intl/dcgettext.c: Likewise for category_to_name and guess_category_value. * intl/localealias.c: Likewise for read_alias_file. * io/fts.c: Likewise for fts_alloc, fts_build, fts_lfree, fts_maxarglen, fts_padjust, fts_palloc, fts_sort, and fts_stat. * libio/genops.c: Likewise for save_for_backup. * malloc/malloc.c (chunk_free, chunk_alloc, chunk_realloc, chunk_align, main_trim, heap_trim): Likewise. * malloc/mtrace.c (tr_where): Likewise. * misc/fstab.c (mnt2fs): Likewise. * misc/getttyent.c (skip, value): Likewise. * misc/syslog.c (openlog_internal): Likewise. * misc/tsearch.c (trecurse, tdestroy_internal): Likewise. * nss/nsswitch.c (nss_lookup_function, nss_parse_file, nss_getline, nss_parse_service_list, nss_new_service): Likewise. * posix/wordexp.c (parse_dollars, parse_backtick, eval_expr): Likewise. * resolv/inet_ntop.c (inet_ntop4, inet_ntop6): Likewise. * resolv/inet_pton.c (inet_pton4, inet_pton6): Likewise. * resolv/res_init.c (res_setoptions): Likewise. * stdio-common/printf_fp.c (group_number): Likewise. * stdio-common/vfprintf.c (buffered_vfprintf, group_number): Likewise. * stdlib/fmtmsg.c (internal_addseverity): Likewise. * sunrpc/auth_des.c (synchronize): Likewise. * sunrpc/auth_unix.c (marshal_new_auth): Likewise. * sunrpc/clnt_perr.c (auth_errmsg): Likewise. * sunrpc/key_call.c (key_call): Likewise. * sunprc/pmap_rmt.c (getbroadcastnets): Likewise. * sunrpc/svc_tcp.c (makefd_xprt): Likewise. * sunrpc/svcauth_des.c (cache_init, cache_spot, cache_ref, invalidate): Likewise. * sunrpc/xdr_rec.c (fix_buf_size, skip_input_bytes, flush_out, set_input_fragment, get_input_bytes): Likewise. * sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path, phys_pages_info): Likewise. * sysdeps/unix/sysv/linux/if_index.c (opensock): Likewise. * sysdeps/unix/sysv/linux/poll.c (__emulate_poll): Likewise. * sysdeps/unix/sysv/linux/readv.c (__atomic_readv_replacement): Likewise. * sysdeps/unix/sysv/linux/readv.c (__atomic_writev_replacement): Likewise. * time/strptime.c (strptime_internal): Likewise. * time/tzfile.c (find_transition, compute_tzname_max): Likewise. * time/tzset.c (compute_change, tz_compute, tzset_internal): Likewise. * libc.map: Remove _libio_using_thunks, add _fp_hw and _dl_addr. * ctype/ctype.h: Pretty print. * grp/grp.h: Likewise. * include/libc-symbols.h: Likewise. * include/limits.h: Likewise. * include/values.h: Likewise. * io/fcntl.h: Likewise. * io/sys/stat.h: Likewise. * libio/stdio.h: Likewise. * malloc/malloc.h: Likewise. * misc/err.h: Likewise. * misc/regexp.h: Likewise. * misc/sys/cdefs.h: Likewise. * misc/sys/file.h: Likewise. * posix/sys/utsname.h: Likewise. * posix/sys/wait.h: Likewise. * pwd/pwd.h: Likewise. * resolv/netdb.h: Likewise. * signal/signal.h: Likewise. * stdlib/stdlib.h: Likewise. * string/endian.h: Likewise. * string/memory.h: Likewise. * sysdeps/mach/hurd/bits/fcntl.h: Likewise. * sysdeps/mach/hurd/sys/param.h: Likewise. * sysdeps/unix/sysv/linux/sys/param.h: Likewise. * termios/termios.h: Likewise. * wcsmbs/wchar.h: Likewise. * wctype/wctype.h: Likewise. * sysdeps/unix/bsd/bsd4.4/wait3.c: Use __WAIT_STATUS in definition. Implement Large File Support API. * include/features.h: Add suuport for _LARGEFILE_SOURCE, _LARGEFILE64_SOURCE, and _FILE_OFFSET_BITS. * libc.map: Add new functions for LFS. * dirent/Makefile (routines): Add readdir64 and readdir64_r. * dirent/dirent.h: Update readdir prototype for LFS and add new prototypes for above functions. * io/Makefile (routines): Add xstat64, fxstat64, lxstat64, statfs64, fstatfs64, lstat64, open64, lseek64, creat64, and ftw64. * io/creat64.c: New file. * io/fstat64.c: New file. * io/lstat64.c: New file. * io/stat64.c: New file. * io/ftw64.c: New file. * io/ftw.c: Rewrite to allow easy definition of ftw64. * io/ftw.h: Add LFS interface. * io/fcntl.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statfs.h: Likewise. * libio/Makefile (routines): Add iofgetpos64, iofopen64, iofsetpos64, freopen64, fseeko64, and ftello64. * libcio/fseeko64.c: New file. * libio/ftello64.c: New file. * libio/iofgetpos64.c: New file. * libio/iofopen64.c: New file. * libio/iofsetpos64.c: New file. * libio/fileops.c (_IO_file_fopen): Change to use _IO_off64_t. (_IO_file_attach): Likewise. (_IO_do_write): Likewise. (_IO_file_sync): Likewise. (_IO_file_seek): Likewise. (_IO_file_seekoff): Likewise. Use _G_stat64. (_IO_file_fopen64): New function. (_IO_file_jumps): Initialize showmanyc and imbue. * libio/genops.c (_IO_default_seekpos): Change to use _IO_fpos64_t. (_IO_default_seekoff): Likewise. (_IO_default_seek): Likewise. (_IO_default_showmanyc, _IO_default_imbue): New functions. * libio/iofopncook.c (_IO_cookie_seek): Change to use _IO_off64_t. * libio/iolibio.h: Add prototypes for LFS functions. * libio/ioseekoff.c: Change to use _IO_fpos64_t. * libio/ioseekpos.c: Likewise. * libio/libio.h: Define _IO_fpos64_t and _IO_off64_t. (_IO_FILE): Move _offset field to end and change type to _IO_off64_t. (_IO_seekoff, _IO_seekpos): Change prototype. * libio/libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t): Change to use _IO_off64_t. Change prototypes for function from the *ops.c files. * libio/stdio.h: Add LFS interface definition. * libio/strops.c (_IO_str_seekoff): Change to use _IO_fpos64_t. * posix/Makefile (routines): Add pread64 and pwrite64. * posix/confstr.c: Handle _CS_LFS* requests. * posix/getconf.c: Handle LFS* requests. * sysdeps/generic/confname.h: Add _CS_LFS* constants. * posix/unistd.h: Document _LFS64_LARGEFILE and _LFS64_STDIO. Define off_t and off64_t appropriately. Change prototypes of LFS functions. * posix/sys/types.h: Add LFS types. * resources/Makefile (routines): Add getrlimit64 and setlimit64. * resource/sys/resource.h: Change prototypes of LFS functions. * stdio-common/Makefile (routines): Add tmpfile64. * stdio-common/tmpfile64.c: New file. * sysdeps/generic/_G_config.h: Define _G_fpos64_t and _G_off64_t. Define _G_OPEN64, _G_LSEEK64, _G_FSTAT64. * sysdeps/unix/sysv/linux/_G_config.h: Likewise. * sysdeps/generic/bits/resource.h: Add LFS definitions. * sysdeps/unix/bsd/sun/sunos4/bits/resource.h: Likewise. * sysdeps/unix/sysv/linux/bits/resource.h: Likewise. * sysdeps/generic/statfs.h: Use __fsblkcnt_t for some of the fields. * sysdeps/unix/sysv/linux/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise. * sysdeps/generic/types.h: Define LFS types. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Likewise. * sysdeps/generic/sys/mman.h: Add LFS definitions. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/generic/mach/hurd/bits/fcntl.h: Add flock LFS extensions. * sysdeps/unix/bsd/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. * sysdeps/generic/mach/hurd/bits/stat.h: Add stat LFS extensions. * sysdeps/unix/bsd/bits/stat.h: Likewise. * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise. * sysdeps/posix/open64.c: New file. * sysdeps/stub/fstatfs64.c: New file. * sysdeps/stub/fxstat64.c: New file. * sysdeps/stub/getrlimit64.c: New file. * sysdeps/stub/lseek64.c: New file. * sysdeps/stub/lxstat64.c: New file. * sysdeps/stub/open64.c: New file. * sysdeps/stub/pread64.c: New file. * sysdeps/stub/pwrite64.c: New file. * sysdeps/stub/readdir64.c: New file. * sysdeps/stub/readdir64_r.c: New file. * sysdeps/stub/setrlimit64.c: New file. * sysdeps/stub/statfs64.c: New file. * sysdeps/stub/xstat64.c: New file. * sysdeps/unix/sysv/linux/llseek.c: Define as __llseek and make llseek and lseek64 weak aliases. * sysdeps/unix/sysv/linux/lseek64.c: New file. Empty. * sysdeps/unix/sysv/linux/alpha/bits/dirent.h: New file. * sysdeps/unix/sysv/linux/bits/dirent.h: Add LFS definitions. * sysdeps/posix/tempname.c: Add extra argument to trigger use of open64. * sysdeps/stub/tempname.c: Likewise. * stdio-common/tempnam.c: Call __stdio_gen_tempname with extra argument. * stdio-common/tmpfile.c: Likewise. * stdio-common/tmpnam.c: Likewise. * stdio-common/tmpnam_r.c: Likewise. * libio/libioP.h: Add definition ofr showmanyc and imbue callbacks. * libio/fileops.c (_IO_file_jumps): Initialize showmanyc and imbue. * libio/iofopncook.c (_IO_cookie_jumps): Likewise. * libio/iopopen.c (_IO_proc_jumps): Likewise. * libio/memstream.c (_IO_mem_jumps): Likewise. * libio/obprintf.c (_IO_obstack_jumps): Likewise. * libio/vsnprintf.c (_IO_strn_jumps): Likewise. * libio/strops.c (_IO_str_jumps): Likewise. * manual/arith.texi: Add a few words why cabs should be used. * manual/llio.texi: Describe sync, fsync, fdatasync. Tell about cleanup handlers & fcntl,lseek,write,read,close,open. * manual/process.texi: Tell about cleanup handlers & system,waitpid, wait. * manual/signal.texi: Likewise for pause. * manual/terminal.texi: Likewise for tcdrain. * manual/time.texi: Document nanosleep. * posix/exevp.c: Don't use nested function. * stdlib/ucontext.h: New file. * sysdeps/i386/sys/ucontext.h: New file. SysV/i386 API definitions. * sunrpc/xcrypt.c (hexval): Make a macro for efficiency. * sysdeps/i386/setjmp.h: Make `here` label local. * sysdeps/i386/elf/start.S: Define _fp_hw "variable". * sysdeps/stub/fstatfs.c: Correct warning. * sysdeps/stub/fxstat.c: Likewise. * sysdeps/stub/lxstat.c: Likewise. * sysdeps/unix/sysv/i386/i686/time.S: New file. 1997-10-03 20:56 Jason Merrill <jason@yorick.cygnus.com> * malloc/obstack.h (obstack_empty_p): New macro. 1997-10-04 17:41 Philip Blundell <Philip.Blundell@pobox.com> * inet/getnameinfo.c (getnameinfo): Remove spurious `#if INET6'. 1997-09-30 Zack Weinberg <zack@rabi.phys.columbia.edu> * maint.texi: Add copyright terms for libdb (Sleepycat, Harvard). Document new --with-binutils switch; delete reference to --with-gnu-as, --with-gnu-ld, --with-gnu-binutils. Add to description of --without-fp: a kernel FPU emulator is adequate (from FAQ) * INSTALL: Regenerated. 1997-09-30 17:29 Richard Henderson <rth@cygnus.com> * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Move _dl_hwcap declaration to ... (elf_machine_fixup_plt): ... here.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
28 files changed, 634 insertions, 219 deletions
diff --git a/sysdeps/unix/sysv/linux/_G_config.h b/sysdeps/unix/sysv/linux/_G_config.h index 8dc9221519..ccb84ad8f7 100644 --- a/sysdeps/unix/sysv/linux/_G_config.h +++ b/sysdeps/unix/sysv/linux/_G_config.h @@ -15,16 +15,19 @@ hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ -#define _WINT_T +# define _WINT_T typedef unsigned int wint_t; #endif #define _G_size_t size_t #define _G_fpos_t __off_t +#define _G_fpos64_t __off64_t #define _G_ssize_t __ssize_t #define _G_off_t __off_t +#define _G_off64_t __off64_t #define _G_pid_t __pid_t #define _G_uid_t __uid_t #define _G_wint_t wint_t +#define _G_stat64 stat typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); @@ -45,6 +48,10 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #define _G_HAVE_MMAP 1 #define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_OPEN64 open64 +#define _G_LSEEK64 lseek64 +#define _G_FSTAT64 fstat64 + /* This is defined by <bits/stat.h> if `st_blksize' exists. */ #define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) @@ -53,15 +60,15 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); /* These are the vtbl details for ELF. */ #define _G_NAMES_HAVE_UNDERSCORE 0 #define _G_VTABLE_LABEL_HAS_LENGTH 1 -#define _G_USING_THUNKS +#define _G_USING_THUNKS 1 #define _G_VTABLE_LABEL_PREFIX "__vt_" #define _G_VTABLE_LABEL_PREFIX_ID __vt_ #if defined (__cplusplus) || defined (__STDC__) -#define _G_ARGS(ARGLIST) ARGLIST +# define _G_ARGS(ARGLIST) ARGLIST #else -#define _G_ARGS(ARGLIST) () +# define _G_ARGS(ARGLIST) () #endif #endif /* _G_config.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h new file mode 100644 index 0000000000..4d717e4194 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is 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 _BITS_DIRENT_H +#define _BITS_DIRENT_H 1 + +/* We don't have to make a difference for __USE_FILE_OFFSET64. */ +struct dirent + { + long int d_ino; + __off_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; +#endif + +#define d_fileno d_ino /* Backwards compatibility. */ + +#undef _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF +#define _DIRENT_HAVE_D_TYPE + +#endif /* bits/dirent.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index b70502f21a..14840649ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H -#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." #endif @@ -27,8 +27,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -48,25 +48,36 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 - -#define F_SETOWN 5 /* for sockets. */ -#define F_GETOWN 6 /* for sockets. */ +/* XXX missing */ +#define O_LARGEFILE 0 + +/* 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 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 7 /* Get record locking info. */ +#define F_SETLK64 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 9 /* Set record locking info (blocking). */ + +#ifdef __USE_BSD +# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +#endif /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 8 +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 8 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 16 /* or 3 */ @@ -79,22 +90,34 @@ blocking */ #define LOCK_UN 8 /* remove lock */ +/* We don't need to support __USE_FILE_OFFSET64. */ struct flock { - short int l_type; - short int l_whence; - __off_t l_start; - __off_t l_len; - __pid_t l_pid; + 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 +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 768b8192ff..cc2a2eac90 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -46,7 +46,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned int st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - int st_blocks; /* Nr. of 512-byte blocks allocated. */ + __blkcnt_t st_blocks; /* Nr. of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; }; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 9a4666a508..cf2668a0e6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -27,9 +27,9 @@ /* Convenience types. */ typedef unsigned char __u_char; -typedef unsigned short __u_short; +typedef unsigned short int __u_short; typedef unsigned int __u_int; -typedef unsigned long __u_long; +typedef unsigned long int __u_long; typedef unsigned long int __u_quad_t; typedef long int __quad_t; typedef signed char __int8_t; @@ -52,6 +52,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef long int __ssize_t; /* Type of a byte count, or error. */ +typedef long int __rlim_t; /* Type of resource counts. */ +typedef long int __rlim64_t; /* Type of resource counts (LFS). */ typedef struct { @@ -92,4 +94,19 @@ typedef struct typedef int __key_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef unsigned int __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef unsigned long int __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/bits/dirent.h b/sysdeps/unix/sysv/linux/bits/dirent.h index ccf5080151..1f8ff1e3d0 100644 --- a/sysdeps/unix/sysv/linux/bits/dirent.h +++ b/sysdeps/unix/sysv/linux/bits/dirent.h @@ -16,17 +16,34 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _DIRENTRY_H -#define _DIRENTRY_H 1 +#ifndef _BITS_DIRENT_H +#define _BITS_DIRENT_H 1 struct dirent { - long int d_ino; +#ifndef __USE_FILE_OFFSET64 + __ino_t d_ino; __off_t d_off; +#else + __ino64_t d_ino; + __off64_t d_off; +#endif unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; +#endif + #define d_fileno d_ino /* Backwards compatibility. */ #undef _DIRENT_HAVE_D_NAMLEN @@ -34,4 +51,4 @@ struct dirent #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE -#endif /* _DIRENTRY_H */ +#endif /* bits/dirent.h */ diff --git a/sysdeps/unix/sysv/linux/bits/fcntl.h b/sysdeps/unix/sysv/linux/bits/fcntl.h index 62c3052d8c..302fa00498 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H -#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." #endif @@ -27,8 +27,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -47,25 +47,36 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ +/* XXX missing */ +#define O_LARGEFILE 0 + +/* 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). */ + +/* XXX missing */ +#define F_GETLK64 5 /* Get record locking info. */ +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#ifdef __USE_BSD +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif -/* for F_[GET|SET]FL */ +/* For F_[GET|SET]FL. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 +/* 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 */ @@ -80,20 +91,35 @@ struct flock { - short int l_type; - short int l_whence; - __off_t l_start; - __off_t l_len; - __pid_t l_pid; + 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'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __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 +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h index 05cae83244..9ee6ea5b27 100644 --- a/sysdeps/unix/sysv/linux/bits/resource.h +++ b/sysdeps/unix/sysv/linux/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include <asm/resource.h> +#include <bits/types.h> /* Transmute defines to enumerations. The macro re-definitions are necessary because some programs want to test for operating system @@ -103,13 +104,33 @@ enum __rlimit_resource #define RLIM_INFINITY 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. */ - long int rlim_cur; - /* The hard limit. */ - long int rlim_max; -}; + { + /* 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 @@ -131,46 +152,46 @@ enum __rusage_who /* 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; -}; + { + /* 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. */ diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h index 1c6e5f84ca..aab025890c 100644 --- a/sysdeps/unix/sysv/linux/bits/stat.h +++ b/sysdeps/unix/sysv/linux/bits/stat.h @@ -39,18 +39,29 @@ struct stat { __dev_t st_dev; /* Device. */ unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif unsigned long int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - unsigned long int st_blocks; /* Number of 512-byte blocks allocated. */ +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif __time_t st_atime; /* Time of last access. */ unsigned long int __unused1; __time_t st_mtime; /* Time of last modification. */ @@ -61,6 +72,36 @@ struct stat unsigned long int __unused5; }; +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; + + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + unsigned long int st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + unsigned long int __unused4; + unsigned long int __unused5; + }; +#endif + +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ diff --git a/sysdeps/unix/sysv/linux/bits/statfs.h b/sysdeps/unix/sysv/linux/bits/statfs.h index 8b9501423c..c79c80e84c 100644 --- a/sysdeps/unix/sysv/linux/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/bits/statfs.h @@ -23,20 +23,44 @@ #ifndef _BITS_STATFS_H #define _BITS_STATFS_H -#include <bits/types.h> /* for __fsid_t */ +#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ struct statfs { int f_type; int f_bsize; - int f_blocks; - int f_bfree; - int f_bavail; - int f_files; - int f_ffree; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsblkcnt_t f_files; + __fsblkcnt_t f_ffree; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; +#endif __fsid_t f_fsid; int f_namelen; int f_spare[6]; }; +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + int f_type; + 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; + int f_namelen; + int f_spare[6]; + }; +#endif + #endif /* bits/statfs.h */ diff --git a/sysdeps/unix/sysv/linux/bits/types.h b/sysdeps/unix/sysv/linux/bits/types.h index 34f4682b3c..daa94336de 100644 --- a/sysdeps/unix/sysv/linux/bits/types.h +++ b/sysdeps/unix/sysv/linux/bits/types.h @@ -65,6 +65,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef int __ssize_t; /* Type of a byte count, or error. */ +typedef long int __rlim_t; /* Type of resource counts. */ +typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */ typedef struct { @@ -100,4 +102,25 @@ typedef struct typedef int __key_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef __u_long __blkcnt_t; +typedef __u_quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef long int __fsblkcnt_t; +typedef __quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef __u_long __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Type of file serial numbers. */ +typedef __u_long __ino64_t; + +/* Type of file sizes and offsets. */ +typedef __loff_t __off64_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 2b855c7a84..dd1c77a99e 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -1,5 +1,5 @@ -/* getsysstats - Determine various system internal values, Linux version. - Copyright (C) 1996 Free Software Foundation, Inc. +/* Determine various system internal values, Linux version. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -30,6 +30,7 @@ /* Determine the path to the /proc filesystem if available. */ static char * +internal_function get_proc_path (char *buffer, size_t bufsize) { FILE *fp; @@ -115,6 +116,7 @@ weak_alias (__get_nprocs, get_nprocs_conf) /* General function to get information about memory status from proc filesystem. */ static int +internal_function phys_pages_info (const char *format) { FILE *fp; diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c index 36863db486..2e0bc5bf8f 100644 --- a/sysdeps/unix/sysv/linux/if_index.c +++ b/sysdeps/unix/sysv/linux/if_index.c @@ -28,6 +28,7 @@ /* Try to get a socket to talk to the kernel. */ #if defined SIOGIFINDEX || defined SIOGIFNAME static int +internal_function opensock (void) { /* Cache the last AF that worked, to avoid many redundant calls to diff --git a/sysdeps/unix/sysv/linux/llseek.c b/sysdeps/unix/sysv/linux/llseek.c index a1284db6be..31dd86f232 100644 --- a/sysdeps/unix/sysv/linux/llseek.c +++ b/sysdeps/unix/sysv/linux/llseek.c @@ -1,5 +1,5 @@ /* Long-long seek operation. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ extern int __sys_llseek (int fd, off_t offset_hi, off_t offset_lo, /* Seek to OFFSET on FD, starting from WHENCE. */ loff_t -llseek (int fd, loff_t offset, int whence) +__llseek (int fd, loff_t offset, int whence) { loff_t result; @@ -33,3 +33,5 @@ llseek (int fd, loff_t offset, int whence) (off_t) (offset & 0xffffffff), &result, whence) ?: result); } +weak_alias (__llseek, llseek) +weak_alias (__llseek, lseek64) diff --git a/sysdeps/unix/sysv/linux/lseek64.c b/sysdeps/unix/sysv/linux/lseek64.c new file mode 100644 index 0000000000..d81e98fb51 --- /dev/null +++ b/sysdeps/unix/sysv/linux/lseek64.c @@ -0,0 +1 @@ +/* We don't need a definition since the llseek function is what we need. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 2586140fdc..09d6fb6d4c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H -#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." #endif #include <sys/types.h> @@ -26,8 +26,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -47,25 +47,36 @@ #define O_NDELAY O_NONBLOCK -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 14 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 24 /* for sockets. */ -#define F_GETOWN 23 /* for sockets. */ +/* XXX missing */ +#define O_LARGEFILE 0 + +/* 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 14 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 14 /* Get record locking info. */ +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#ifdef __USE_BSD +# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +#endif /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 +/* 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 */ @@ -78,23 +89,42 @@ blocking */ #define LOCK_UN 8 /* remove lock */ -typedef struct flock { - short l_type; - short l_whence; - __off_t l_start; - __off_t l_len; - long l_sysid; /* XXX */ - __pid_t l_pid; - long pad[4]; /* XXX */ -} flock_t; +typedef 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'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + long int l_sysid; /* XXX */ + __pid_t l_pid; /* Process holding the lock. */ + long int pad[4]; /* XXX */ + } flock_t; + +#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. */ + long int l_sysid; /* XXX */ + __pid_t l_pid; /* Process holding the lock. */ + long int pad[4]; /* XXX */ + }; +#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 +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index a797b34c38..f27a75eb9a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -39,14 +39,22 @@ struct stat { unsigned long int st_dev; long int st_pad1[3]; +#ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ unsigned long int st_rdev; /* Device number, if device. */ long int st_pad2[2]; +#ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif /* SVR4 added this extra long to allow for expansion of off_t. */ long int st_pad3; /* @@ -60,8 +68,11 @@ struct stat __time_t st_ctime; /* Time of last status change. */ long int __reserved2; long int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - long int st_blocks; /* Number of 512-byte blocks allocated. */ +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ +#endif char st_fstype[16]; /* Filesystem type name */ long int st_pad4[8]; /* Linux specific fields */ @@ -69,6 +80,42 @@ struct stat unsigned int st_gen; }; +#ifdef __USE_LARGEFILE64 +struct stat64 + { + unsigned long int st_dev; + long int st_pad1[3]; + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long int st_pad2[2]; + __off64_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long int st_pad3; + /* + * Actually this should be timestruc_t st_atime, st_mtime and + * st_ctime but we don't have it under Linux. + */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; + long int st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* Filesystem type name */ + long int st_pad4[8]; + /* Linux specific fields */ + unsigned int st_flags; + unsigned int st_gen; + }; +#endif + +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ /* Encoding of the file mode. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 3b2306147c..2727b27257 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -23,22 +23,52 @@ #ifndef _BITS_STATFS_H #define _BITS_STATFS_H +#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ + struct statfs { long int f_type; #define f_fstyp f_type long int f_bsize; long int f_frsize; /* Fragment size - unsupported */ - long int f_blocks; - long int f_bfree; - long int f_files; - long int f_ffree; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_files; + __fsblkcnt_t f_ffree; + __fsblkcnt_t f_bavail; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; + __fsblkcnt64_t f_bavail; +#endif + + /* Linux specials */ + __fsid_t f_fsid; + long int f_namelen; + long int f_spare[6]; + }; + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + long int f_type; +#define f_fstyp f_type + long int f_bsize; + long int f_frsize; /* Fragment size - unsupported */ + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; + __fsblkcnt64_t f_bavail; /* Linux specials */ - long int f_bavail; __fsid_t f_fsid; long int f_namelen; long int f_spare[6]; }; +#endif #endif /* bits/statfs.h */ diff --git a/sysdeps/unix/sysv/linux/poll.c b/sysdeps/unix/sysv/linux/poll.c index b92139aab4..f6e71b79b6 100644 --- a/sysdeps/unix/sysv/linux/poll.c +++ b/sysdeps/unix/sysv/linux/poll.c @@ -25,7 +25,7 @@ extern int __syscall_poll __P ((struct pollfd *fds, unsigned int nfds, weak_extern (__syscall_poll) static int __emulate_poll __P ((struct pollfd *fds, unsigned long int nfds, - int timeout)); + int timeout)) internal_function; /* The real implementation. */ int @@ -58,5 +58,6 @@ poll (fds, nfds, timeout) /* Get the emulation code. */ -#define poll(fds, nfds, timeout) static __emulate_poll (fds, nfds, timeout) +#define poll(fds, nfds, timeout) \ + static internal_function __emulate_poll (fds, nfds, timeout) #include <sysdeps/unix/bsd/poll.c> diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c index 2c215ce920..10cd519609 100644 --- a/sysdeps/unix/sysv/linux/readv.c +++ b/sysdeps/unix/sysv/linux/readv.c @@ -24,7 +24,7 @@ extern ssize_t __syscall_readv __P ((int, __const struct iovec *, int)); static ssize_t __atomic_readv_replacement __P ((int, __const struct iovec *, - int)); + int)) internal_function; /* Not all versions of the kernel support the large number of records. */ @@ -56,5 +56,5 @@ __readv (fd, vector, count) } weak_alias (__readv, readv) -#define __readv static __atomic_readv_replacement +#define __readv static internal_function __atomic_readv_replacement #include <sysdeps/posix/readv.c> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h index ca4d34c14e..9e8c589b9a 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h @@ -24,8 +24,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files @@ -44,24 +44,35 @@ #define O_NDELAY (0x0004 | O_NONBLOCK) #define O_NOCTTY 0x8000 /* not fcntl */ -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETOWN 5 /* for sockets. */ -#define F_SETOWN 6 /* for sockets. */ -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 +/* XXX missing */ +#define O_LARGEFILE 0 + +/* 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. */ +#ifdef __USE_BSD +# define F_GETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +# define F_SETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 7 /* Get record locking info. */ +#define F_SETLK64 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 9 /* Set record locking info (blocking). */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 3 +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 4 /* or 3 */ @@ -76,22 +87,39 @@ struct flock { - short int l_type; - short int l_whence; - __off_t l_start; - __off_t l_len; - __pid_t l_pid; + 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'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ short int __unused; }; +#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. */ + short int __unused; + }; +#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 +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h b/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h index 46867d8e41..b33493ee46 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h @@ -33,10 +33,10 @@ #undef TCSETS #undef TCSETSW #undef TCSETSF -#define TCGETS _IOR ('T', 8, struct __kernel_termios) -#define TCSETS _IOW ('T', 9, struct __kernel_termios) -#define TCSETSW _IOW ('T', 10, struct __kernel_termios) -#define TCSETSF _IOW ('T', 11, struct __kernel_termios) +#define TCGETS _IOR ('T', 8, char[36]) +#define TCSETS _IOW ('T', 9, char[36]) +#define TCSETSW _IOW ('T', 10, char[36]) +#define TCSETSF _IOW ('T', 11, char[36]) #include <linux/sockios.h> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h index 462f7c2998..a417928863 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h @@ -27,9 +27,9 @@ /* Convenience types. */ typedef unsigned char __u_char; -typedef unsigned short __u_short; +typedef unsigned short int __u_short; typedef unsigned int __u_int; -typedef unsigned long __u_long; +typedef unsigned long int __u_long; typedef unsigned long int __u_quad_t; typedef long int __quad_t; typedef signed char __int8_t; @@ -45,13 +45,15 @@ typedef __quad_t *__qaddr_t; typedef __u_long __dev_t; /* Type of device numbers. */ typedef __u_int __uid_t; /* Type of user identifications. */ typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_int __ino_t; /* Type of file serial numbers. */ +typedef __u_long __ino_t; /* Type of file serial numbers. */ typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ typedef __u_int __nlink_t; /* Type of file link counts. */ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef long long int __ssize_t; /* Type of a byte count, or error. */ +typedef long int __rlim_t; /* Type of resource counts. */ +typedef long int __rlim64_t; /* Type of resource counts (LFS). */ typedef struct { @@ -92,4 +94,19 @@ typedef struct typedef int __key_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef long int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef unsigned int __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef unsigned long int __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h index fcb752e3ec..dd509a7e8a 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h @@ -2,7 +2,7 @@ struct kernel_stat { unsigned int st_dev; - unsigned int st_ino; + unsigned long int st_ino; unsigned int st_mode; short int st_nlink; unsigned int st_uid; @@ -18,5 +18,5 @@ struct kernel_stat unsigned long int __unused2; }; -#define _HAVE___UNUSED1 -#define _HAVE___UNUSED2 +#define _HAVE___UNUSED1 +#define _HAVE___UNUSED2 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S index fcc5cb5a48..65a1d34836 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S @@ -29,21 +29,15 @@ /* int _setjmp(jmp_buf) */ -.weak _setjmp -ENTRY(_setjmp) - +ENTRY(__setjmp) ba __sigsetjmp_local set 0, %o1 - -END(setjmp) +END(__setjmp) /* int setjmp(jmp_buf) */ -.weak setjmp ENTRY(setjmp) - set 1, %o1 - END(setjmp) /* int __sigsetjmp(jmp_buf, savemask) */ @@ -65,3 +59,6 @@ __sigsetjmp_local: mov %g1, %o0 END(__sigsetjmp) + +weak_alias(__setjmp, _setjmp) +weak_extern(setjmp) diff --git a/sysdeps/unix/sysv/linux/sys/mman.h b/sysdeps/unix/sysv/linux/sys/mman.h index c8f512c00c..129702e33c 100644 --- a/sysdeps/unix/sysv/linux/sys/mman.h +++ b/sysdeps/unix/sysv/linux/sys/mman.h @@ -44,8 +44,18 @@ __BEGIN_DECLS extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); +#ifndef __USE_FILE_OFFSET64 extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); +#else +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)) + __asm__ ("mmap64"); +#endif +#ifdef __USE_LARGEFILE64 +extern __caddr_t mmap64 __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset)); +#endif /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ diff --git a/sysdeps/unix/sysv/linux/sys/param.h b/sysdeps/unix/sysv/linux/sys/param.h index d5f6239cd2..c2a56a2c29 100644 --- a/sysdeps/unix/sysv/linux/sys/param.h +++ b/sysdeps/unix/sysv/linux/sys/param.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ #define NBBY CHAR_BIT #ifndef NGROUPS -#define NGROUPS NGROUPS_MAX +# define NGROUPS NGROUPS_MAX #endif #define MAXSYMLINKS 5 #define CANBSIZ MAX_CANON @@ -47,7 +47,7 @@ /* Macros for counting and rounding. */ #ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) +# define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define powerof2(x) ((((x)-1)&(x))==0) diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c index 31e794fb04..3b3c5b65fc 100644 --- a/sysdeps/unix/sysv/linux/writev.c +++ b/sysdeps/unix/sysv/linux/writev.c @@ -24,7 +24,7 @@ extern ssize_t __syscall_writev __P ((int, const struct iovec *, int)); static ssize_t __atomic_writev_replacement __P ((int, const struct iovec *, - int)); + int)) internal_function; /* Not all versions of the kernel support the large number of records. */ @@ -56,5 +56,5 @@ __writev (fd, vector, count) } weak_alias (__writev, writev) -#define __writev static __atomic_writev_replacement +#define __writev static internal_function __atomic_writev_replacement #include <sysdeps/posix/writev.c> |