mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-10-28 23:34:53 +03:00 
			
		
		
		
	1997-12-28 15:08 Ulrich Drepper <drepper@cygnus.com> * sysdeps/powerpc/__longjmp.S: Define _SETJMP_H before including <bits/setjmp.h>. * sysdeps/powerpc/setjmp.S: Likewise. Patches by Matt McLean <keys@keys.got.net>. * Make-dist (sysdep_dirs): Ignore bits dirs while searching. * Makefile: Undo last patch. (distribute): Add test-installation.pl. * configure.in: Correct handling of --enable-add-ons without parameter. Correct address of WWW pages. * libc.map: Add _nl_domain_bindings. * db2/mutex/tsl_parisc.s: New file. * iconvdata/Makefile (distribute): Add jis0201.c, jis0208.c, jis0212.c, and extra-module.mk. * localedata/Makefile (distribute): New. Add all the files. * stdlib/Makefile (headers): Add inttypes.h. (routines): Add strtoimax, strtoumax, wcstoimax, and wcstoumax. * sysdeps/generic/inttypes.h: New file. * sysdeps/generic/strtoimax.c: New file. * sysdeps/generic/strtoumax.c: New file. * sysdeps/generic/wcstoimax.c: New file. * sysdeps/generic/wcstoumax.c: New file. * sysdeps/wordsize-32/Dist: Removed. * sysdeps/wordsize-32/Makefile: Removed. * sysdeps/wordsize-64/Dist: Removed. * sysdeps/wordsize-64/Makefile: Removed. * sysdeps/generic/bits/environments.h: New file. * include/limits.h: Define MB_LEN_MAX in any case to 6. The gcc header is still not correct. * io/fcntl.h [__USE_FILE_OFFSET64]: We have to use the __*64 types. * posix/unistd.h: Likewise. * sysdeps/generic/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * manual/arith.texi: Change definition of mul macro. * manual/math.texi: Likewise. * misc/Makefile (routines): Add mmap64. * sysdeps/generic/mmap64.c: New file. * sysdeps/unix/sysv/linux/alpha/mmap64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/mmap64.c: New file. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __mmap64 and mmap64 aliases to mmap. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/generic/setrlimit64.c: Don't mark as stub. * nis/nss_nis/nis-hosts.c (internal_nis_gethostent_r): Pretty print. * nis(rpcsvc/nis_tags.h: Prevent warning by unknown pragma. * sysdeps/posix/mk-stdiolim.c: Generate correct file which defines FOPEN_MAX also when included by limits.h. * sysdeps/unix/sysv/linux/stdio_lim.h.in: Likewise. * sysdeps/unix/sysv/linux/Dist: Add oldsiglist.c, netax25/ax25.h, and netrom/netrom.h. * sysdeps/unix/sysv/linux/Makefile [$(subdir)=stdio-common]: Add oldsiglist to sysdep_routines, not aux. [$(subdir)=inet] (sysdep_headers): Add netax25/ax25.h, netrom/netrom.h. * sysdeps/unix/sysv/linux/bits/socket.h: Remove SOL_AX25, SOL_ATALK, and SOL_NETROM definition. * sysdeps/unix/sysv/linux/i386/Dist: Add s_pwrite64.S and s_pread64.S. * sysdeps/unix/sysv/linux/net/route.h: Pretty print. * sysdeps/unix/sysv/linux/netatalk/at.h: Pretty print. 1997-12-25 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/alpha/net/route.h: New file. * sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h: Replace sa_handler with k_sa_handler. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __getrlimit as strong alias. Reported by a sun. * sysdeps/unix/sysv/linux/sigsuspend.c: Don't define __libc_have_rt_sigs here. * sysdeps/unix/sysv/linux/sigaction.c: Do it instead here. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sigpending.c: Correct comment. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. 1997-12-11 07:51 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/atomicity.h: New file. * sysdeps/mach/powerpc/machine-lock.h: New file. * Rules: Use -fpic to build anything that might end up in a users' shared library. * sysdeps/powerpc/s_fdim.c: New file. * sysdeps/powerpc/s_fdimf.c: New file. * sysdeps/powerpc/s_fmax.S: New file. * sysdeps/powerpc/s_fmaxf.S: New file. * sysdeps/powerpc/s_fmin.S: New file. * sysdeps/powerpc/s_fminf.S: New file. * sysdeps/powerpc/s_llrint.c: Now is for double. * sysdeps/powerpc/s_llrintf.c: New file. * sysdeps/powerpc/s_llround.c: Now is for double. * sysdeps/powerpc/s_llroundf.c: New file. * sysdeps/powerpc/s_lrint.c: Now is for double. * sysdeps/powerpc/s_lrintf.S: New file. * sysdeps/powerpc/s_lround.c: Now is for double. * sysdeps/powerpc/s_lroundf.c: New file. * sysdeps/powerpc/bits/mathinlines.h: Add inline versions of lrint, lrintf, fdim, fdimf. * sysdeps/unix/sysv/linux/powerpc/kernel_termios.h: Don't use bits/ file directly, use its parent. * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Re-instate '++' (for the third time). 1997-12-20 13:50 Richard Henderson <rth@cygnus.com> * posix/sched.h: timespec is in <time.h>. * sysdeps/unix/sysv/linux/sys/kd.h: Don't redefine _LINUX_TYPES_H.
		
			
				
	
	
		
			227 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			227 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /* System-specific socket constants and types.  Linux version.
 | |
|    Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
 | |
|    This file is part of the GNU C Library.
 | |
| 
 | |
|    The GNU C Library is free software; you can redistribute it and/or
 | |
|    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 _SYS_SOCKET_H
 | |
| # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 | |
| #endif
 | |
| 
 | |
| #define	__need_size_t
 | |
| #define __need_NULL
 | |
| #include <stddef.h>
 | |
| 
 | |
| #include <sys/types.h>
 | |
| 
 | |
| /* Type for length arguments in socket calls.  */
 | |
| typedef unsigned int socklen_t;
 | |
| 
 | |
| /* Types of sockets.  */
 | |
| enum __socket_type
 | |
| {
 | |
|   SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
 | |
| 				   byte streams.  */
 | |
| #define SOCK_STREAM SOCK_STREAM
 | |
|   SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
 | |
| 				   of fixed maximum length.  */
 | |
| #define SOCK_DGRAM SOCK_DGRAM
 | |
|   SOCK_RAW = 3,			/* Raw protocol interface.  */
 | |
| #define SOCK_RAW SOCK_RAW
 | |
|   SOCK_RDM = 4,			/* Reliably-delivered messages.  */
 | |
| #define SOCK_RDM SOCK_RDM
 | |
|   SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
 | |
| 				   datagrams of fixed maximum length.  */
 | |
| #define SOCK_SEQPACKET SOCK_SEQPACKET
 | |
|   SOCK_PACKET = 10		/* Linux specific way of getting packets
 | |
| 				   at the dev level.  For writing rarp and
 | |
| 				   other similar things on the user level. */
 | |
| #define SOCK_PACKET SOCK_PACKET
 | |
| };
 | |
| 
 | |
| /* Protocol families.  */
 | |
| #define	PF_UNSPEC	0	/* Unspecified.  */
 | |
| #define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
 | |
| #define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
 | |
| #define	PF_FILE		PF_LOCAL /* POSIX name for PF_LOCAL.  */
 | |
| #define	PF_INET		2	/* IP protocol family.  */
 | |
| #define	PF_AX25		3	/* Amateur Radio AX.25.  */
 | |
| #define	PF_IPX		4	/* Novell Internet Protocol.  */
 | |
| #define	PF_APPLETALK	5	/* Don't use this.  */
 | |
| #define	PF_NETROM	6	/* Amateur radio NetROM.  */
 | |
| #define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
 | |
| #define	PF_AAL5		8	/* Reserved for Werner's ATM.  */
 | |
| #define	PF_X25		9	/* Reserved for X.25 project.  */
 | |
| #define	PF_INET6	10	/* IP version 6.  */
 | |
| #define	PF_ROSE		11	/* Amateur Radio X.25 PLP       */
 | |
| #define	PF_DECnet	12	/* Reserved for DECnet project  */
 | |
| #define	PF_NETBEUI	13	/* Reserved for 802.2LLC project*/
 | |
| #define	PF_SECURITY	14	/* Security callback pseudo AF */
 | |
| #define	pseudo_PF_KEY	15	/* PF_KEY key management API */
 | |
| #define	PF_NETLINK	16
 | |
| #define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD */
 | |
| #define	PF_PACKET	17	/* Packet family                */
 | |
| #define	PF_MAX		32	/* For now.. */
 | |
| 
 | |
| /* Address families.  */
 | |
| #define	AF_UNSPEC	PF_UNSPEC
 | |
| #define	AF_LOCAL	PF_LOCAL
 | |
| #define	AF_UNIX		PF_UNIX
 | |
| #define	AF_FILE		PF_FILE
 | |
| #define	AF_INET		PF_INET
 | |
| #define	AF_AX25		PF_AX25
 | |
| #define	AF_IPX		PF_IPX
 | |
| #define	AF_APPLETALK	PF_APPLETALK
 | |
| #define	AF_NETROM	PF_NETROM
 | |
| #define	AF_BRIDGE	PF_BRIDGE
 | |
| #define	AF_AAL5		PF_AAL5
 | |
| #define	AF_X25		PF_X25
 | |
| #define	AF_INET6	PF_INET6
 | |
| #define	AF_ROSE		PF_ROSE
 | |
| #define	AF_DECnet	PF_DECnet
 | |
| #define	AF_NETBEUI	PF_NETBEUI
 | |
| #define	AF_SECURITY	PF_SECURITY
 | |
| #define	AF_KEY		pseudo_PF_KEY
 | |
| #define	AF_NETLINK	PF_NETLINK
 | |
| #define	AF_ROUTE	PF_ROUTE
 | |
| #define	AF_PACKET	PF_PACKET
 | |
| #define	AF_MAX		PF_MAX
 | |
| 
 | |
| /* Socket level values.  Others are defined in the appropriate headers.
 | |
| 
 | |
|    XXX These definitions also should go into the appropriate headers as
 | |
|    far as they are available.  */
 | |
| #define SOL_IPV6        41
 | |
| #define SOL_ICMPV6      58
 | |
| #define SOL_RAW		255
 | |
| #define SOL_ROSE        260
 | |
| #define SOL_DECNET      261
 | |
| #define SOL_X25         262
 | |
| 
 | |
| /* Maximum queue length specifiable by listen.  */
 | |
| #define SOMAXCONN	128
 | |
| 
 | |
| /* Get the definition of the macro to define the common sockaddr members.  */
 | |
| #include <bits/sockaddr.h>
 | |
| 
 | |
| /* Structure describing a generic socket address.  */
 | |
| struct sockaddr
 | |
|   {
 | |
|     __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
 | |
|     char sa_data[14];		/* Address data.  */
 | |
|   };
 | |
| 
 | |
| 
 | |
| /* Bits in the FLAGS argument to `send', `recv', et al.  */
 | |
| enum
 | |
|   {
 | |
|     MSG_OOB		= 0x01,	/* Process out-of-band data.  */
 | |
|     MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
 | |
|     MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
 | |
|     MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
 | |
|     MSG_PROXY		= 0x10	/* Supply or ask second address.  */
 | |
|   };
 | |
| 
 | |
| 
 | |
| /* Structure describing messages sent by
 | |
|    `sendmsg' and received by `recvmsg'.  */
 | |
| struct msghdr
 | |
|   {
 | |
|     __ptr_t msg_name;		/* Address to send to/receive from.  */
 | |
|     socklen_t msg_namelen;	/* Length of address data.  */
 | |
| 
 | |
|     struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
 | |
|     size_t msg_iovlen;		/* Number of elements in the vector.  */
 | |
| 
 | |
|     __ptr_t msg_control;	/* Ancillary data (eg BSD filedesc passing). */
 | |
|     size_t msg_controllen;	/* Ancillary data buffer length.  */
 | |
| 
 | |
|     int msg_flags;		/* Flags on received message.  */
 | |
|   };
 | |
| 
 | |
| /* Structure used for storage of ancillary data object information.  */
 | |
| struct cmsghdr
 | |
|   {
 | |
|     size_t cmsg_len;		/* Length of data in cmsg_data plus length
 | |
| 				   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.  */
 | |
| #endif
 | |
|   };
 | |
| 
 | |
| /* Ancillary data object manipulation macros.  */
 | |
| #if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
 | |
| # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
 | |
| #else
 | |
| # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
 | |
| #endif
 | |
| #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
 | |
| #define CMSG_FIRSTHDR(mhdr) \
 | |
|   ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
 | |
|    ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
 | |
| #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
 | |
| 			 & ~(sizeof (size_t) - 1))
 | |
| #define CMSG_SPACE(len) (CMSG_ALIGN (len) \
 | |
| 			 + CMSG_ALIGN (sizeof (struct cmsghdr)))
 | |
| #define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
 | |
| 
 | |
| #ifndef _EXTERN_INLINE
 | |
| # define _EXTERN_INLINE extern __inline
 | |
| #endif
 | |
| extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
 | |
| 					   struct cmsghdr *__cmsg));
 | |
| _EXTERN_INLINE struct cmsghdr *
 | |
| __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
 | |
| {
 | |
|   unsigned char *__p;
 | |
| 
 | |
|   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
 | |
|     /* The kernel header does this so there may be a reason.  */
 | |
|     return NULL;
 | |
| 
 | |
|   __p = (((unsigned char *) __cmsg)
 | |
| 	 + ((__cmsg->cmsg_len + sizeof (long int) - 1) & ~sizeof (long int)));
 | |
|   if (__p >= (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)
 | |
|     /* No more entries.  */
 | |
|     return NULL;
 | |
|   return (struct cmsghdr *) __p;
 | |
| }
 | |
| 
 | |
| /* Socket level message types.  This must match the definitions in
 | |
|    <linux/socket.h>.  */
 | |
| enum
 | |
|   {
 | |
|     SCM_RIGHTS = 0x01,		/* Data array contains access rights.  */
 | |
| #define SCM_RIGHTS SCM_RIGHTS
 | |
|     __SCM_CREDENTIALS = 0x02,	/* Data array is `struct ucred'.  */
 | |
|     __SCM_CONNECT = 0x03	/* Data array is `struct scm_connect'.  */
 | |
|   };
 | |
| 
 | |
| 
 | |
| /* Get socket manipulation related informations from kernel headers.  */
 | |
| #include <asm/socket.h>
 | |
| 
 | |
| 
 | |
| /* Structure used to manipulate the SO_LINGER option.  */
 | |
| struct linger
 | |
|   {
 | |
|     int l_onoff;		/* Nonzero to linger on close.  */
 | |
|     int l_linger;		/* Time to linger.  */
 | |
|   };
 |