From 6f810c757e5b14a97f05652972e91f95e321a404 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 2 Feb 2011 17:58:38 +0100 Subject: sync bits/socket.h PF_* / AF_* values with 2.6.38-rc3 A number of new address / protocol families have been added over the years, so sync with Linux 2.6.38-rc3, adding CAN, ISDN, Phonet, Zigbee, .. which are starting to be used by applications. Signed-off-by: Peter Korsgaard Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/socket.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h index 11f6e9715..7e12733ae 100644 --- a/libc/sysdeps/linux/common/bits/socket.h +++ b/libc/sysdeps/linux/common/bits/socket.h @@ -98,8 +98,18 @@ enum __socket_type #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_LLC 26 /* Linux LLC. */ +#define PF_CAN 29 /* Controller Area Network. */ +#define PF_TIPC 30 /* TIPC sockets. */ #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ +#define PF_IUCV 32 /* IUCV sockets. */ +#define PF_RXRPC 33 /* RxRPC sockets. */ +#define PF_ISDN 34 /* mISDN sockets. */ +#define PF_PHONET 35 /* Phonet sockets. */ +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +#define PF_CAIF 37 /* CAIF sockets. */ +#define PF_ALG 38 /* Algorithm sockets. */ +#define PF_MAX 39 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -130,7 +140,17 @@ enum __socket_type #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE +#define AF_LLC PF_LLC +#define AF_CAN PF_CAN +#define AF_TIPC PF_TIPC #define AF_BLUETOOTH PF_BLUETOOTH +#define AF_IUCV PF_IUCV +#define AF_RXRPC PF_RXRPC +#define AF_ISDN PF_ISDN +#define AF_PHONET PF_PHONET +#define AF_IEEE802154 PF_IEEE802154 +#define AF_CAIF PF_CAIF +#define AF_ALG PF_ALG #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. -- cgit v1.2.3 From 380b5c5b31bdbf5e171ce035009e5e53b0ea230d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:33:21 +0100 Subject: use common sigthread.h NPTL build did not use the correct bits/sigthread.h, use a common version avoiding this. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/sigthread.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/sigthread.h b/libc/sysdeps/linux/common/bits/sigthread.h index 960bde18a..4f14b9f45 100644 --- a/libc/sysdeps/linux/common/bits/sigthread.h +++ b/libc/sysdeps/linux/common/bits/sigthread.h @@ -1,5 +1,5 @@ /* Signal handling function for threaded programs. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -35,4 +35,10 @@ extern int pthread_sigmask (int __how, /* Send signal SIGNO to the given thread. */ extern int pthread_kill (pthread_t __threadid, int __signo) __THROW; +#if defined __USE_GNU && defined __UCLIBC_HAS_THREADS_NATIVE__ +/* Queue signal and data to a thread. */ +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) __THROW; +#endif + #endif /* bits/sigthread.h */ -- cgit v1.2.3 From 83c1854b97d79e2b67065b1a2651b0d11d8a8f6b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 15:06:51 +0100 Subject: remove error handling from some syscalls Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp Use strong_alias if fallbacks are needed Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/syscalls-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h index 5e4e350c5..1b84d9e2b 100644 --- a/libc/sysdeps/linux/common/bits/syscalls-common.h +++ b/libc/sysdeps/linux/common/bits/syscalls-common.h @@ -97,6 +97,7 @@ type name(C_DECL_ARGS_##nargs(args)) { \ } #define _syscall0(args...) SYSCALL_FUNC(0, args) +#define _syscall_noerr0(args...) SYSCALL_NOERR_FUNC(0, args) #define _syscall1(args...) SYSCALL_FUNC(1, args) #define _syscall_noerr1(args...) SYSCALL_NOERR_FUNC(1, args) #define _syscall2(args...) SYSCALL_FUNC(2, args) -- cgit v1.2.3 From 5e22e71adfef5ad46119cea98fccf4ae998ad0d8 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 21:59:58 +0100 Subject: remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references. Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS. Disable sigstack function prototype, it is not provided by uClibc. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/sigstack.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/sigstack.h b/libc/sysdeps/linux/common/bits/sigstack.h index 7f260367b..2b3b321bd 100644 --- a/libc/sysdeps/linux/common/bits/sigstack.h +++ b/libc/sysdeps/linux/common/bits/sigstack.h @@ -22,12 +22,14 @@ #endif +#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__ /* Structure describing a signal stack (obsolete). */ struct sigstack { void *ss_sp; /* Signal stack pointer. */ int ss_onstack; /* Nonzero if executing on this stack. */ }; +#endif /* Possible values for `ss_flags.'. */ -- cgit v1.2.3 From ca8f0d9cf39e60851e17f0c6dd5f3e4f51b64f5b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 22:30:10 +0100 Subject: simplify guard of uClibc internals Simplify guard of uClibc internals, since _LIBC sections are removed on install. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/uClibc_ctype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/uClibc_ctype.h b/libc/sysdeps/linux/common/bits/uClibc_ctype.h index 3bf4e1b28..5ff281d8e 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_ctype.h +++ b/libc/sysdeps/linux/common/bits/uClibc_ctype.h @@ -95,7 +95,7 @@ /**********************************************************************/ __BEGIN_DECLS -#if defined _LIBC && (defined NOT_IN_libc || defined IS_IN_libc) +#ifdef _LIBC /* These are uClibc-specific. */ # define __isdigit_char(c) ((unsigned char)((c) - '0') <= 9) # define __isdigit_int(c) ((unsigned int)((c) - '0') <= 9) -- cgit v1.2.3 From 96c9a8f7d00cdf6bb7968a2390b9d87da8a45e2d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 15:06:47 +0100 Subject: add _dl_errno support to errno.h, cleanup Add support to use errno.h in ldso. Move __set_errno into _LIBC guard. Remove uClibc_errno.h, unused. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/uClibc_errno.h | 43 --------------------------- 1 file changed, 43 deletions(-) delete mode 100644 libc/sysdeps/linux/common/bits/uClibc_errno.h (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h deleted file mode 100644 index 9c1561841..000000000 --- a/libc/sysdeps/linux/common/bits/uClibc_errno.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2000-2006 Erik Andersen - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ -#ifndef _BITS_UCLIBC_ERRNO_H -#define _BITS_UCLIBC_ERRNO_H 1 - -#ifdef IS_IN_rtld -# undef errno -# define errno _dl_errno -extern int _dl_errno; /* attribute_hidden; */ -#elif defined __UCLIBC_HAS_THREADS__ -# include -# if defined USE___THREAD && USE___THREAD -# undef errno -# ifndef NOT_IN_libc -# define errno __libc_errno -# else -# define errno errno -# endif -extern __thread int errno attribute_tls_model_ie; -# endif /* USE___THREAD */ -#endif /* IS_IN_rtld */ - -#define __set_errno(val) (errno = (val)) - -#ifndef __ASSEMBLER__ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)) -# ifdef IS_IN_rtld - attribute_hidden -# endif -; -# if defined __UCLIBC_HAS_THREADS__ -# include -# if defined USE___THREAD && USE___THREAD -libc_hidden_proto(__errno_location) -# endif -# endif - -#endif /* !__ASSEMBLER__ */ - -#endif -- cgit v1.2.3 From 117fbd4310fa600d0449d4268b4e6ee833471e1a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 09:54:15 +0100 Subject: types.h: remove __ipc_pid_t Remove __ipc_pid_t, not needed internally, we do not support pre glibc-2.2 version of shmid_ds structure. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/types.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/types.h b/libc/sysdeps/linux/common/bits/types.h index 24d0056fb..c4c10e2ff 100644 --- a/libc/sysdeps/linux/common/bits/types.h +++ b/libc/sysdeps/linux/common/bits/types.h @@ -200,11 +200,6 @@ __STD_TYPE __U32_TYPE __socklen_t; #undef __STD_TYPE -#ifdef _LIBC -/* Used in `struct shmid_ds'. */ -typedef __kernel_ipc_pid_t __ipc_pid_t; -#endif - /* Now add the thread types. */ #if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98) # include -- cgit v1.2.3 From 92895c04f3033834ee512942014a9e643ba579a5 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 13:10:41 +0100 Subject: bits/statvfs.h: update, adding ST_RELATIME Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/bits/statvfs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/statvfs.h b/libc/sysdeps/linux/common/bits/statvfs.h index cca0871ac..84717c3d9 100644 --- a/libc/sysdeps/linux/common/bits/statvfs.h +++ b/libc/sysdeps/linux/common/bits/statvfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2001,2002,2006 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 @@ -101,7 +101,9 @@ enum # define ST_IMMUTABLE ST_IMMUTABLE ST_NOATIME = 1024, /* Do not update access times. */ # define ST_NOATIME ST_NOATIME - ST_NODIRATIME = 2048 /* Do not update directory access times. */ + ST_NODIRATIME = 2048, /* Do not update directory access times. */ # define ST_NODIRATIME ST_NODIRATIME + ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ +# define ST_RELATIME ST_RELATIME #endif /* Use GNU. */ }; -- cgit v1.2.3