This fixes a compile error under Solaris: "a cast does not yield an
lvalue". I think this is something that GCC allows that others don't.
It's not entirely clear to me why 'rflags' was a UINTVAL to begin with.
It doesn't look like this code is really in use anyway. But in any case,
casting an lvalue is probably not a good idea here.
Index: io_unix.c
===================================================================
RCS file: /home/perlcvs/parrot/io/io_unix.c,v
retrieving revision 1.15
diff -u -r1.15 io_unix.c
--- io_unix.c 17 Mar 2002 05:07:31 -0000 1.15
+++ io_unix.c 18 Mar 2002 23:35:02 -0000
@@ -193,7 +193,7 @@
ParrotIO *io;
UINTVAL oflags, mode;
#ifdef HAS_HEADER_FCNTL
- UINTVAL rflags;
+ INTVAL rflags;
#endif
mode = 0;
@@ -203,7 +203,7 @@
/* FIXME - Check file handle flags, validity */
#ifdef HAS_HEADER_FCNTL
/* Get descriptor flags */
- if (((INTVAL)rflags = fcntl(fd, F_GETFL, 0)) >= 0) {
+ if ((rflags = fcntl(fd, F_GETFL, 0)) >= 0) {
/*int accmode = rflags & O_ACCMODE; */
/* Check other flags (APPEND, ASYNC, etc) */
}
- D
<[EMAIL PROTECTED]>