Tested on PowerPC/VxWorks, applied on the mainline.

2016-07-11  Eric Botcazou  <ebotca...@adacore.com>

        PR ada/71817
        * adaint.c (__gnat_is_read_accessible_file): Add parentheses.
        (__gnat_is_write_accessible_file): Likewise.

-- 
Eric Botcazou
Index: adaint.c
===================================================================
--- adaint.c	(revision 238156)
+++ adaint.c	(working copy)
@@ -1924,7 +1924,7 @@ __gnat_is_read_accessible_file (char *na
 #elif defined (__vxworks)
    int fd;
 
-   if (fd = open (name, O_RDONLY, 0) < 0)
+   if ((fd = open (name, O_RDONLY, 0)) < 0)
      return 0;
    close (fd);
    return 1;
@@ -1997,7 +1997,7 @@ __gnat_is_write_accessible_file (char *n
 #elif defined (__vxworks)
    int fd;
 
-   if (fd = open (name, O_WRONLY, 0) < 0)
+   if ((fd = open (name, O_WRONLY, 0)) < 0)
      return 0;
    close (fd);
    return 1;

Reply via email to