Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-04-27 14:46:49 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-04-27 14:46:49 +0400
commit19fd2ce8a4ece1c9e19400b4c2429adf4ba9a620 (patch)
tree5993cb9e5b9306917c05e354d929a416d557a6ba /winsup/testsuite
parenta069f5602ee213504a1e8f42048d2fc39b3126c3 (diff)
* winsup.api/mmaptest04.c: Take care for binmode explicitely.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/ChangeLog4
-rw-r--r--winsup/testsuite/winsup.api/mmaptest04.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index 0e1b95ce9..feeb4e641 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * winsup.api/mmaptest04.c: Take care for binmode explicitely.
+
2001-04-19 Corinna Vinschen <corinna@vinschen.de>
* winsup.api/mmaptest02.c: New test.
diff --git a/winsup/testsuite/winsup.api/mmaptest04.c b/winsup/testsuite/winsup.api/mmaptest04.c
index e8cc0a61f..56c4a88b7 100644
--- a/winsup/testsuite/winsup.api/mmaptest04.c
+++ b/winsup/testsuite/winsup.api/mmaptest04.c
@@ -3,6 +3,10 @@
#include <sys/mman.h>
#include <errno.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
int
main ()
{
@@ -21,7 +25,7 @@ main ()
for (i = 0; i < pagesize; ++i)
*(data + i) = rand ();
umask (0);
- fd = creat ("conftestmmap", 0600);
+ fd = open ("conftestmmap", O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0600);
if (fd < 0)
{
printf ("creat: %d\n", errno);
@@ -37,7 +41,7 @@ main ()
/*
* Next, try to mmap the file.
*/
- fd = open ("conftestmmap", O_RDWR);
+ fd = open ("conftestmmap", O_RDWR | O_BINARY);
if (fd < 0)
{
printf ("write: %d\n", errno);