svn commit: trunk/uClibc/libc/sysdeps/linux/common
Peter S. Mazinger
ps.m at gmx.net
Sun Jan 29 17:34:58 UTC 2006
On Sun, 29 Jan 2006 vapier at uclibc.org wrote:
> Author: vapier
> Date: 2006-01-29 07:32:48 -0800 (Sun, 29 Jan 2006)
> New Revision: 13666
>
> Log:
> create local prototypes to shutup warnings
>
> Modified:
> trunk/uClibc/libc/sysdeps/linux/common/getdents.c
> trunk/uClibc/libc/sysdeps/linux/common/getdents64.c
> trunk/uClibc/libc/sysdeps/linux/common/ulimit.c
> trunk/uClibc/libc/sysdeps/linux/common/vfork.c
>
>
> Changeset:
> Modified: trunk/uClibc/libc/sysdeps/linux/common/getdents.c
> ===================================================================
> --- trunk/uClibc/libc/sysdeps/linux/common/getdents.c 2006-01-29 15:27:02 UTC (rev 13665)
> +++ trunk/uClibc/libc/sysdeps/linux/common/getdents.c 2006-01-29 15:32:48 UTC (rev 13666)
> @@ -34,6 +34,7 @@
> #define __NR___syscall_getdents __NR_getdents
> static inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count);
>
> +ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes);
> ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes)
> {
> struct dirent *dp;
>
> Modified: trunk/uClibc/libc/sysdeps/linux/common/getdents64.c
> ===================================================================
> --- trunk/uClibc/libc/sysdeps/linux/common/getdents64.c 2006-01-29 15:27:02 UTC (rev 13665)
> +++ trunk/uClibc/libc/sysdeps/linux/common/getdents64.c 2006-01-29 15:32:48 UTC (rev 13666)
> @@ -39,6 +39,7 @@
> # define __NR___syscall_getdents64 __NR_getdents64
> static inline _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count);
>
> +ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes);
> ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes)
> {
> struct dirent64 *dp;
getdents[64] have also signedness problems
>
> Modified: trunk/uClibc/libc/sysdeps/linux/common/ulimit.c
> ===================================================================
> --- trunk/uClibc/libc/sysdeps/linux/common/ulimit.c 2006-01-29 15:27:02 UTC (rev 13665)
> +++ trunk/uClibc/libc/sysdeps/linux/common/ulimit.c 2006-01-29 15:32:48 UTC (rev 13666)
> @@ -9,7 +9,8 @@
>
> #ifdef __NR_ulimit
>
> -_syscall2(long, ulimit, int, cmd, int, arg);
> +extern long int ulimit(int cmd, long arg);
> +_syscall2(long, ulimit, int, cmd, long, arg);
ulimit.h should be used for both cases, but syscall2() is not in sync
with the prototype, that's why I haven't corrected that.
> Modified: trunk/uClibc/libc/sysdeps/linux/common/vfork.c
> ===================================================================
> --- trunk/uClibc/libc/sysdeps/linux/common/vfork.c 2006-01-29 15:27:02 UTC (rev 13665)
> +++ trunk/uClibc/libc/sysdeps/linux/common/vfork.c 2006-01-29 15:32:48 UTC (rev 13666)
> @@ -3,6 +3,7 @@
> *
> * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
> */
> +
> /* Trivial implementation for arches that lack vfork */
> #include <unistd.h>
> #include <sys/types.h>
> @@ -11,6 +12,7 @@
> #ifdef __NR_fork
> libc_hidden_proto(fork)
>
> +pid_t attribute_hidden __vfork(void);
better
extern __typeof(vfork) __vfork attribute_hidden;
where I could use this, I have done it so we do not have to keep track of
changes in the header, and if we change anything in the header, we will
get a warning/error here.
Peter
> pid_t attribute_hidden __vfork(void)
> {
> return fork();
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list