components/stdcxx/patches/001-22.locale.messages.cpp.patch
changeset 402 94ae4d75524c
equal deleted inserted replaced
401:bf52ef48020c 402:94ae4d75524c
       
     1 --- stdcxx-4.2.1/tests/localization/22.locale.messages.cpp	2008-04-24 20:23:10.000000000 -0400
       
     2 +++ stdcxx-4.2.1/tests/localization/22.locale.messages.cpp	2009-03-28 01:09:14.686728000 -0400
       
     3 @@ -51,6 +51,11 @@
       
     4  #    include <unistd.h>      // for getcwd()
       
     5  #  endif
       
     6  #  include <fcntl.h>         // for mode flags for _open
       
     7 +#else
       
     8 +#  include <sys/types.h>
       
     9 +#  include <sys/stat.h>
       
    10 +#  include <unistd.h>      // for getcwd()
       
    11 +#  include <fcntl.h>         // for mode flags for _open
       
    12  #endif   // _RWSTD_NO_NEW_HEADER
       
    13  
       
    14  #undef open
       
    15 @@ -695,7 +700,7 @@
       
    16      std::messages_base::catalog cats [NCATS];
       
    17  
       
    18      // detect descriptor leaks
       
    19 -    const int fd1 = open (__FILE__, O_RDONLY);
       
    20 +    const int fd1 = open (__FILE__, _RWSTD_O_RDONLY);
       
    21  
       
    22      const std::locale loc = std::locale::classic ();
       
    23  
       
    24 @@ -731,7 +736,7 @@
       
    25              close_catalog (msgs, cats [i], false, cname, __LINE__);
       
    26      }
       
    27  
       
    28 -    int fd2 = open (__FILE__, O_RDONLY);
       
    29 +    int fd2 = open (__FILE__, _RWSTD_O_RDONLY);
       
    30      rw_assert (fd2 - fd1 == 1, 0, __LINE__,
       
    31                 "messages<%s>::close() leaked %d file descriptors",
       
    32                 cname, fd2 - fd1 - 1);
       
    33 @@ -750,7 +755,7 @@
       
    34      // close again fd2
       
    35      close (fd2);
       
    36  
       
    37 -    fd2 = open (__FILE__, O_RDONLY);
       
    38 +    fd2 = open (__FILE__, _RWSTD_O_RDONLY);
       
    39      rw_assert (fd2 - fd1 == 1, 0, __LINE__,
       
    40                 "messages<%s>::close() leaked %d file descriptors",
       
    41                 cname, fd2 - fd1 - 1);