diff options
-rw-r--r-- | libc/sysdeps/linux/common/cmsg_nxthdr.c | 24 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/create_module.c | 14 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/fchown.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getdents.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getpgrp.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getppid.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/mkfifo.c | 20 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/modify_ldt.c | 7 |
8 files changed, 49 insertions, 41 deletions
diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c index ce6a298c0..8350c3a4d 100644 --- a/libc/sysdeps/linux/common/cmsg_nxthdr.c +++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c @@ -1,21 +1,21 @@ /* Return point to next ancillary data entry in message header. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or - 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. + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser 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. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ #define __FORCE_GLIBC #include <features.h> @@ -32,10 +32,10 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg) cmsg = (struct cmsghdr *) ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len)); - if ((unsigned char *) (cmsg + 1) >= ((unsigned char *) mhdr->msg_control - + mhdr->msg_controllen) + if ((unsigned char *) (cmsg + 1) > ((unsigned char *) mhdr->msg_control + + mhdr->msg_controllen) || ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len) - >= ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen))) + > ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen))) /* No more entries. */ return NULL; return cmsg; diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c index 9a5c2d267..f15bb18c5 100644 --- a/libc/sysdeps/linux/common/create_module.c +++ b/libc/sysdeps/linux/common/create_module.c @@ -1,8 +1,10 @@ /* vi: set sw=4 ts=4: */ -/* Syscalls for uClibc +/* + * create_module syscall for uClibc * - * Copyright (C) 2000 by Lineo, inc. and Erik Andersen * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include <errno.h> @@ -18,8 +20,8 @@ unsigned long create_module(const char *name, size_t size); #if defined(__UCLIBC_BROKEN_CREATE_MODULE__) # define __NR___create_module __NR_create_module static inline _syscall2(long, __create_module, const char *, name, size_t, size); -/* By checking the value of errno, we know if we have been fooled - * by the syscall2 macro making a very high address look like a +/* By checking the value of errno, we know if we have been fooled + * by the syscall2 macro making a very high address look like a * negative, so we we fix it up here. */ unsigned long create_module(const char *name, size_t size) { @@ -40,10 +42,10 @@ static inline _syscall4(unsigned long, __create_module, const char *, name, size_t, size, size_t, dummy, size_t, err); unsigned long create_module(const char *name, size_t size) { - return __create_module(name, size, 0, 0); + return __create_module(name, size, 0, 0); } #else -/* Sparc, MIPS, etc don't mistake return values for errors. */ +/* Sparc, MIPS, etc don't mistake return values for errors. */ _syscall2(unsigned long, create_module, const char *, name, size_t, size); #endif diff --git a/libc/sysdeps/linux/common/fchown.c b/libc/sysdeps/linux/common/fchown.c index dbadd607e..fa8734284 100644 --- a/libc/sysdeps/linux/common/fchown.c +++ b/libc/sysdeps/linux/common/fchown.c @@ -2,13 +2,22 @@ /* * fchown() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" #include <unistd.h> +#include <linux/version.h> + +/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32 + bit type all along. */ +#if LINUX_VERSION_CODE >= 131879 + +_syscall3(int, fchown, int, fd, uid_t, owner, gid_t, group); + +#else #define __NR___syscall_fchown __NR_fchown static inline _syscall3(int, __syscall_fchown, int, fd, @@ -23,3 +32,5 @@ int fchown(int fd, uid_t owner, gid_t group) } return (__syscall_fchown(fd, owner, group)); } + +#endif diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 7fe191d77..11c2570c4 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -101,6 +101,10 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) return (char *) dp - buf; } +#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 +attribute_hidden strong_alias(__getdents,__getdents64) +#endif + #elif __WORDSIZE == 32 libc_hidden_proto(memmove) diff --git a/libc/sysdeps/linux/common/getpgrp.c b/libc/sysdeps/linux/common/getpgrp.c index a910cb0cc..9260e432a 100644 --- a/libc/sysdeps/linux/common/getpgrp.c +++ b/libc/sysdeps/linux/common/getpgrp.c @@ -2,9 +2,9 @@ /* * getpgrp() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" diff --git a/libc/sysdeps/linux/common/getppid.c b/libc/sysdeps/linux/common/getppid.c index 81d613bb9..6a68ad615 100644 --- a/libc/sysdeps/linux/common/getppid.c +++ b/libc/sysdeps/linux/common/getppid.c @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" diff --git a/libc/sysdeps/linux/common/mkfifo.c b/libc/sysdeps/linux/common/mkfifo.c index dddfe8c7b..cbde71e04 100644 --- a/libc/sysdeps/linux/common/mkfifo.c +++ b/libc/sysdeps/linux/common/mkfifo.c @@ -2,23 +2,19 @@ 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. + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser 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. - - June 28, 2000 -- swiped from GNU libc 2.1.3 and adjusted for uClibc - by Erik Andersen <andersee@debian.org> - */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ #include <errno.h> #include <stddef.h> diff --git a/libc/sysdeps/linux/common/modify_ldt.c b/libc/sysdeps/linux/common/modify_ldt.c index ff7fba4ce..9ebb68b3c 100644 --- a/libc/sysdeps/linux/common/modify_ldt.c +++ b/libc/sysdeps/linux/common/modify_ldt.c @@ -7,14 +7,9 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -/* Nobody really uses this ... */ -#if 0 - #include "syscalls.h" -#ifdef __NR_modify_ldt int modify_ldt (int func, void *ptr, unsigned long bytecount); +#ifdef __NR_modify_ldt _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount); #endif - -#endif |