[patch] SPU readlink
Jeff Johnston
jjohnstn@redhat.com
Sat May 10 23:17:00 GMT 2008
Patch applied. Thanks.
-- Jeff J.
Ken Werner wrote:
> Hi,
>
> since the declaration of readlink (libc/include/sys/unistd.h) is now conform
> to POSIX:
> http://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libc/include/sys/unistd.h?cvsroot=src
> the SPU readlink implementation should also be adjusted. Ok for apply?
>
> Ken
>
> libgloss/ChangeLog:
>
> 2008-04-23 Ken Werner <ken.werner@de.ibm.com>
> * spu/readlink.c: Align readlink implementation to POSIX
>
> Index: src/libgloss/spu/readlink.c
> ===================================================================
> --- src.orig/libgloss/spu/readlink.c
> +++ src/libgloss/spu/readlink.c
> @@ -44,14 +44,8 @@ typedef struct
> unsigned int pad2[3];
> } syscall_readlink_t;
>
> -/*
> - * POSIX says readlink returns ssize_t, and has an size_t bufsiz, but
> - * newlib has it prototyped as returning int, and int bufsiz. ssize_t,
> - * size_t and int are ally currently 4 bytes for SPU, so just leave them
> - * as ints for now.
> - */
> -int
> -readlink (const char *path, char *buf, int bufsiz)
> +ssize_t
> +readlink (const char *path, char *buf, size_t bufsiz)
> {
> syscall_readlink_t sys;
>
>
More information about the Newlib
mailing list