Commit graph

10 commits

Author SHA1 Message Date
Joseph Myers 0595c98494 Fix mq_notify socket, recv namespace (bug 18546).
mq_notify (in the 1996 edition of POSIX) brings in references to recv
and socket (not in POSIX until the 2001 edition).  This patch fixes
this by using __recv and __socket, exporting them from libc at version
GLIBC_PRIVATE.

Tested for x86_64 and x86 (testsuite and comparison of installed
stripped shared libraries; PLT / dynamic symbol table changes render
the comparison not particularly useful for libc).

	[BZ #18546]
	* socket/recv.c (__recv): Use libc_hidden_def.
	* socket/socket.c (__socket): Likewise.
	* sysdeps/mach/hurd/recv.c (__recv): Likewise.
	* sysdeps/mach/hurd/socket.c (__socket): Likewise.
	* sysdeps/unix/sysv/linux/generic/recv.c (__recv): Likewise.
	* sysdeps/unix/sysv/linux/recv.c (__recv): Use libc_hidden_weak.
	* sysdeps/unix/sysv/linux/socket.c (__socket): Use
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/x86_64/recv.c (__recv): Use
	libc_hidden_weak.
	* include/sys/socket.h (__socket): Do not use attribute_hidden.
	Use libc_hidden_proto.
	(__recv): Likewise.
	* socket/Versions (libc): Export __recv and __socket at version
	GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/mq_notify.c (helper_thread): Call __recv
	instead of recv.
	(init_mq_netlink): Call __socket instead of socket.
	* conform/Makefile (test-xfail-POSIX/mqueue.h/linknamespace):
	Remove variable.
2015-06-17 20:20:08 +00:00
Thomas Schwinge 123be9deda Add recvmmsg and sendmmsg to the generic glibc API. 2012-11-20 19:26:04 +01:00
Ulrich Drepper f93fc0b75a * socket/sys/socket.h: Declare accept4.
* socket/accept4.c: New file.
	* sysdeps/unix/sysv/linux/accept4.c: New file.
	* sysdeps/unix/sysv/linux/i386/accept4.S: New file.
	* socket/Makefile (routines): Add accept4.
	* socket/Versions: Export accept4 with version GLIBC_2.10.
	* socket/paccept.c: Removed.
	* sysdeps/unix/sysv/linux/paccept.c: Removed.
	* sysdeps/unix/sysv/linux/i386/paccept.S: Removed.
	* Versions.def: Define GLIBC_2.10 for libc.
	* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_ACCEPT4.

	* nscd/connections.c: Use accept4.

	* sysdeps/unix/sysv/linux/i386/socket.S: Fix comment.
2008-12-03 04:23:18 +00:00
Ulrich Drepper 8ec2550e18 * socket/Versions: Remove paccept export for GLIBC_2.9.
* socket/Makefile (routines): Remove paccept.
	* socket/sys/socket.h: Remove paccept declaration.
2008-09-29 17:08:50 +00:00
Ulrich Drepper bdcebfc4c7 * Versions.def (glibc): Add GLIBC_2.9.
* io/Makefile (routines): Add dup3 and pipe2.
	* io/Versions [glibc] (GLIBC_2.9): Add dup3 and pipe2.
	* io/dup3.c: New file.
	* io/pipe2.c: New file.
	* posix/unistd.h: Declare dup3 and pipe2.
	* socket/Makefile (routines): Add paccept.
	* socket/Versions [glibc] (GLIBC_2.9): Add paccept.
	* socket/paccept.c: New file.
	* socket/sys/socket.h: Declare paccept.
	* sysdeps/unix/syscalls.list: Add entry for dup3.
	* sysdeps/unix/sysv/linux/Versions [glibc] (GLIBC_2.9): Add
	epoll_create2 and inotify_init1.
	* sysdeps/unix/sysv/linux/eventfd.c: Use eventfd1 syscall if possible.
	* sysdeps/unix/sysv/linux/paccept.c: New file.
	* sysdeps/unix/sysv/linux/signalfd.c: Use signalfd4 syscall if
	possible.
	* sysdeps/unix/sysv/linux/socketcall.h: Add SOCKOP_paccept.
	* sysdeps/unix/sysv/linux/syscalls.list: Add epoll_create2,
	inotify_init1, and pipe2 entries.
	* sysdeps/unix/sysv/linux/alpha/sys/epoll.h: New file.
	* sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: New file.
	* sysdeps/unix/sysv/linux/alpha/sys/inotify.h: New file.
	* sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: New file.
	* sysdeps/unix/sysv/linux/alpha/sys/timerfd.h: New file.
	* sysdeps/unix/sysv/linux/bits/socket.h: Define SOCK_CLOEXEC and
	SOCK_NONBLOCK.
	* sysdeps/unix/sysv/linux/i386/paccept.S: New file.
	* sysdeps/unix/sysv/linux/sparc/sys/epoll.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sys/inotify.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sys/signalfd.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sys/timerfd.h: New file.
	* sysdeps/unix/sysv/linux/sparc/bits/socket.h: New file.
	* sysdeps/unix/sysv/linux/sys/epoll.h: Define EPOLL_CLOEXEC and
	EPOLL_NONBLOCK.  Declare epoll_create2.
	* sysdeps/unix/sysv/linux/sys/eventfd.h: Define EFD_CLOEXEC and
	EFD_NONBLOCK.
	* sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOEXEC and
	IN_NONBLOCK.  Declare inotify_init1.
	* sysdeps/unix/sysv/linux/sys/signalfd.h: Define SFD_CLOEXEC and
	SFD_NONBLOCK.
	* sysdeps/unix/sysv/linux/sys/timerfd.h: Define TFD_CLOEXEC and
	TFD_NONBLOCK.
2008-07-25 04:51:56 +00:00
Ulrich Drepper 5ce98c3f3f Update.
2004-05-03  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/bsd/bits/fcntl.h (F_SETOWN, F_GETOWN): Define if
	__USE_BSD or __USE_UNIX98.
	* sysdeps/unix/bsd/ultrix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/common/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/unix/sysv/aix/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/unix/sysv/irix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	*sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_SETOWN, F_GETOWN):
	Likewise.
	* sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* sysdeps/mach/hurd/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
	* io/sys/stat.h (S_ISSOCK, S_IFSOCK): Likewise.

2004-05-01  Jakub Jelinek  <jakub@redhat.com>

	* posix/Versions (libc): Remove __libc_wait, __libc_waitpid,
	__libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64,
	__libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE.
	* stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/Versions (libc): Remove
	__libc_sigaction@@GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove
	__modify_ldt@@GLIBC_PRIVATE.
	* socket/Versions (libc): Remove __libc_accept, __libc_send,
	__libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv,
	__libc_sendto and __libc_connect @@GLIBC_PRIVATE.
	* stdio-common/Versions (libc): Remove
	_itoa_upper_digits@@GLIBC_PRIVATE.
	* resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE.
	* misc/Versions (libc): Remove __libc_fsync, __libc_msync,
	__libc_readv and __libc_writev @@GLIBC_PRIVATE.
	* termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE.
	* io/Versions (libc): Remove __libc_open, __libc_close, __libc_read,
	__libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and
	__libc_lseek64 @@GLIBC_PRIVATE.

2004-04-30  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-load.c (open_verify): Move e_phentsize check after e_type
	check.

2004-04-29  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/powerpc64/fpu/s_ceil.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_floor.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_floorf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_llrint.c: Removed.
	* sysdeps/powerpc/powerpc64/fpu/s_llrint.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_llrintf.c: Removed.
	* sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_llround.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_lround.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_rint.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_rintf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_round.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_roundf.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_trunc.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_truncf.S: New file.

	* math/test-misc.c [LDBL_MANT_DIG == 106](main): Correct LDBL_MAX
	mantissa for AIX long double format.
	* misc/qefgcvt.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Define for AIX
	long double format.
	* misc/qefgcvt_r.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Likewise.
	* stdlib/fpioconst.c [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024]
	(_fpioconst_pow10): AIX long double format has same exponent range as
	double.
	* stdlib/fpioconst.h [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024]
	(LDBL_MAX_10_EXP_LOG): AIX long double format has same exponent range
	as double.

2004-04-23  Art Haas  <ahaas@airmail.net>

	* sysdeps/unix/sysv/linux/kernel-features.h: Add 'defined'.
2004-05-03 21:40:12 +00:00
Ulrich Drepper fb23eb252f Update.
2002-02-01  Jakub Jelinek  <jakub@redhat.com>

	* Versions.def (libc): Add GLIBC_PRIVATE.
	(libdb, libnss_db, libdb1): Remove.
	(libnss_compat, libnss_dns, libnss_files, libnss_hesiod, libnss_nis,
	libnss_nisplus): Move all symbols to GLIBC_PRIVATE.
	(libpthread): Add GLIBC_PRIVATE.
	(libresolv): Likewise, remove GLIBC_2.1.
	(ld): Add GLIBC_PRIVATE, remove GLIBC_2.1.1, GLIBC_2.2, GLIBC_2.2.1,
	GLIBC_2.2.3, GLIBC_2.3.
	* catgets/Versions (__open_catalog): Move to GLIBC_PRIVATE.
	* elf/Versions (_dl_open, _dl_close, _dl_addr, _dl_init_first,
	_dl_sym, _dl_vsym): Likewise.
	(__libc_enable_secure, __libc_stack_end, _dl_argv, _dl_catch_error,
	_dl_check_all_versions, _dl_check_map_versions, _dl_debug_initialize,
	_dl_debug_printf, _dl_debug_state, _dl_dst_count, _dl_dst_substitute,
	_dl_init, _dl_lookup_symbol, _dl_lookup_symbol_skip,
	_dl_lookup_versioned_symbol, _dl_lookup_versioned_symbol_skip,
	_dl_map_object, _dl_map_object_deps, _dl_out_of_memory,
	_dl_relocate_object, _dl_signal_error, _dl_start_profile,
	_dl_starting_up, _dl_sysdep_start, _dl_unload_cache, _rtld_global):
	Likewise.
	(_dl_object_relocation_scope): Remove.
	* hesiod/Versions: Move all symbols to GLIBC_PRIVATE.
	* iconv/Versions (__gconv_alias_db, __gconv_modules_db,
	__gconv_cache): Move to GLIBC_PRIVATE.
	* inet/Versions (__internal_endnetgrent, __internal_getnetgrent_r,
	__internal_setnetgrent): Likewise.
	* io/Versions (__libc_open, __libc_close, __libc_read, __libc_write,
	__libc_lseek, __libc_fcntl, __libc_open64, __libc_lseek64): Likewise.
	* locale/Versions (__collate_element_hash, __collate_element_strings,
	__collate_symbol_classes, __collate_symbol_hash,
	__collate_symbol_strings, _nl_current_LC_COLLATE,
	_nl_current_LC_CTYPE): Likewise.
	* misc/Versions (__libc_fsync, __libc_msync): Likewise.
	* nis/Versions (libnss_compat): Move all symbols to GLIBC_PRIVATE.
	(libnss_nis, libnss_nisplus): Likewise.
	* nss/Versions (_nss_files_parse_grent, _nss_files_parse_pwent,
	_nss_files_parse_spent): Move to GLIBC_PRIVATE.
	(libnss_files): Move all symbols to GLIBC_PRIVATE.
	* posix/Versions (__libc_wait, __libc_waitpid, __libc_pause,
	__libc_nanosleep, __libc_fork, __libc_pread, __libc_pread64,
	__libc_pwrite, __libc_pwrite64): Move to GLIBC_PRIVATE.
	* resolv/Versions (__gai_sigqueue, __ns_name_unpack, __ns_name_ntop,
	__ns_get16, __ns_samename): Likewise.
	(libnss_dns): Move all symbols to GLIBC_PRIVATE.
	* setjmp/Versions (__libc_longjmp, __libc_siglongjmp): Move to
	GLIBC_PRIVATE.
	* socket/Versions (__libc_accept, __libc_send, __libc_recvfrom,
	__libc_recvmsg, __libc_sendmsg, __libc_recv, __libc_sendto,
	__libc_connect): Likewise.
	* stdio-common/Versions (_itoa_lower_digits, _itoa_upper_digits):
	Likewise.
	* stdlib/Versions (__libc_system): Likewise.
	* sunrpc/Versions (__rpc_thread_destroy): Likewise.
	* sysdeps/hppa/Versions: Move all symbols to GLIBC_PRIVATE.
	* sysdeps/ia64/fpu/Versions: Likewise.
	* sysdeps/ia64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/ia64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/i386/Versions (__modify_ldt): Move
	to GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/x86_64/Versions (__modify_ldt): Likewise.
	* sysdeps/unix/sysv/linux/Versions (__syscall_rt_sigqueueinfo,
	__libc_sigaction): Likewise.
	* termios/Versions (__libc_tcdrain): Likewise.

	* misc/sys/cdefs (__attribute_noinline__): Define.
	* elf/dl-lookup.c (_dl_do_lookup, _dl_do_lookup_versioned): Add
	__attribute_noinline__.

	* elf/Makefile (rtld-routines): Add dl-xstat64, dl-fxstat64.
	* elf/dl-xstat64.c: New file.
	* elf/dl-fxstat64.c: New file.
	* sysdeps/unix/sysv/linux/fxstat64.c: If RTLD_STAT64 is defined,
	don't export __fxstat64 at multiple versions.
	* sysdeps/unix/sysv/linux/lxstat64.c: Similarly.
	* sysdeps/unix/sysv/linux/xstat64.c: Similarly.
2002-02-01 23:24:05 +00:00
Ulrich Drepper b504171963 Update.
2001-06-01  Ulrich Drepper  <drepper@redhat.com>

	* 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 09:27:15 +00:00
Ulrich Drepper 48ab6a9e31 Update.
1998-10-26  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/unix/sysv/linux/Versions: Move shutdown ...
	* socket/Versions [libc, GLIBC_2.0]: ... to here.
1998-10-26 11:46:26 +00:00
Ulrich Drepper b0b67c47a5 Update.
1998-07-02 21:51  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig: Define list of subdirs as all-subdirs and make subdirs
	a copy.
	* Makefile: Add rules to generate map files.
	(distribute): Remove libc.map, add Versions.def and versions.awk.
	* Makerules: Change rules to find map files on common-objpfx.
	* elf/Makefile: Likewise.
	* md5-crypt/Makefile: Likewise.
	* nis/Makefile (libnsl-map): Remove.
	* Versions.def: New file.
	* versions.awk: New file.
	* argp/Versions: New file.
	* assert/Versions: New file.
	* catgets/Versions: New file.
	* csu/Versions: New file.
	* ctype/Versions: New file.
	* db/Versions: New file.
	* debug/Versions: New file.
	* dirent/Versions: New file.
	* elf/Versions: New file.
	* gmon/Versions: New file.
	* grp/Versions: New file.
	* hesiod/Versions: New file.
	* hurd/Versions: New file.
	* iconv/Versions: New file.
	* inet/Versions: New file.
	* intl/Versions: New file.
	* io/Versions: New file.
	* libio/Versions: New file.
	* linuxthreads/Versions: New file.
	* locale/Versions: New file.
	* login/Versions: New file.
	* malloc/Versions: New file.
	* math/Versions: New file.
	* md5-crypt/Versions: New file.
	* misc/Versions: New file.
	* nis/Versions: New file.
	* nss/Versions: New file.
	* posix/Versions: New file.
	* pwd/Versions: New file.
	* resolv/Versions: New file.
	* resource/Versions: New file.
	* rt/Versions: New file.
	* setjmp/Versions: New file.
	* shadow/Versions: New file.
	* signal/Versions: New file.
	* socket/Versions: New file.
	* stdio/Versions: New file.
	* stdio-common/Versions: New file.
	* stdlib/Versions: New file.
	* streams/Versions: New file.
	* string/Versions: New file.
	* sunrpc/Versions: New file.
	* sysdeps/alpha/Versions: New file.
	* sysdeps/alpha/fpu/Versions: New file.
	* sysdeps/i386/Versions: New file.
	* sysdeps/sparc/Versions: New file.
	* sysdeps/unix/sysv/Versions: New file.
	* sysdeps/unix/sysv/linux/Versions: New file.
	* sysdeps/unix/sysv/linux/alpha/Versions: New file.
	* sysdeps/unix/sysv/linux/i386/Versions: New file.
	* sysdeps/unix/sysv/linux/mips/Versions: New file.
	* sysvipc/Versions: New file.
	* termios/Versions: New file.
	* time/Versions: New file.
	* wcsmbs/Versions: New file.
	* wctype/Versions: New file.
	* libc.map: Removed.
	* db/libdb.map: Removed.
	* elf/libdl.map: Removed.
	* hesiod/libnss_hesiod.map: Removed.
	* hurd/libhurduser.map: Removed.
	* hurd/libmachuser.map: Removed.
	* linuxthreads/libpthread.map: Removed.
	* locale/libBrokenLocale.map: Removed.
	* login/libutil.map: Removed.
	* math/libm.map: Removed.
	* md5-crypt/libcrypt.map: Removed.
	* nis/libnsl.map: Removed.
	* nis/libnsl_compat.map: Removed.
	* nis/libnss_nis.map: Removed.
	* nis/libnss_nisplus.map: Removed.
	* nss/libnss_db.map: Removed.
	* nss/libnss_files.map: Removed.
	* resolv/libnss_dns.map: Removed.
	* resolv/libresolv.map: Removed.
	* rt/librt.map: Removed.

	* elf/dl-load.c (fillin_rpath): Fix test for trusted directory.
	Fix typos.

	* elf/rtld.c (process_dl_debug): Recognize 'all'.
	(process_envvars): LD_BIND_NOW must be followed by y, Y, or 1.

	* sysdeps/generic/elf/backtracesyms.c: Allocate string memory of
	correct size.

	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Fix typo
	in comment.
1998-07-02 22:51:40 +00:00