diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-20 21:54:47 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-20 21:54:47 +0000 |
commit | be97722968a0b7d1cc3fe1ab7df0510c5b8eed95 (patch) | |
tree | f7e7adc2d62e1433cffd8ca6bcb9f65009f17720 | |
parent | 47484065df5b580f237a04e2acbdc46d594fd3b2 (diff) | |
download | cygnal-be97722968a0b7d1cc3fe1ab7df0510c5b8eed95.tar.gz cygnal-be97722968a0b7d1cc3fe1ab7df0510c5b8eed95.tar.bz2 cygnal-be97722968a0b7d1cc3fe1ab7df0510c5b8eed95.zip |
2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/perror.c: Pass errno as the second argument to
the assist call.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/machine/spu/perror.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 1069c7460..39bd297ea 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,10 @@ 2007-06-20 Patrick Mansfield <patmans@us.ibm.com> + * libc/machine/spu/perror.c: Pass errno as the second argument to + the assist call. + +2007-06-20 Patrick Mansfield <patmans@us.ibm.com> + * libc/include/sys/unistd.h[__SPU__]: Add lockf prototype and related defines; expose ftruncate, truncate and sync prototypes. diff --git a/newlib/libc/machine/spu/perror.c b/newlib/libc/machine/spu/perror.c index 63e7fe82c..028f44a37 100644 --- a/newlib/libc/machine/spu/perror.c +++ b/newlib/libc/machine/spu/perror.c @@ -1,17 +1,30 @@ #include <stdio.h> +#include <errno.h> #include "c99ppe.h" #ifndef _REENT_ONLY +typedef struct +{ + _CONST char* str; + unsigned int pad0[ 3 ]; + int arg_errno; + unsigned int pad1[ 3 ]; +} c99_perror_t; + void _DEFUN (perror, (s), _CONST char *s) { + c99_perror_t arg; + CHECK_STD_INIT(_REENT); - __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &s); + arg.str = s; + arg.arg_errno = errno; + __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &arg); return; } |