summaryrefslogtreecommitdiffstats
path: root/src/util/db2/recno
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1998-01-21 16:33:31 +0000
committerEzra Peisach <epeisach@mit.edu>1998-01-21 16:33:31 +0000
commitf35b277b8d3579e6558208fc45b5b7151fd9b872 (patch)
tree867b61b0d4ac71137bd24493ac89abb22152c776 /src/util/db2/recno
parent43817ef775a04fb5694c39d9d6a27587ce2720a4 (diff)
downloadkrb5-f35b277b8d3579e6558208fc45b5b7151fd9b872.tar.gz
krb5-f35b277b8d3579e6558208fc45b5b7151fd9b872.tar.xz
krb5-f35b277b8d3579e6558208fc45b5b7151fd9b872.zip
* btree/bt_open.c: Added O_BINARY for __CYGWIN32__.
* clib/mkstemp.c: Added O_BINARY for __CYGWIN32__. * db/db.c: Added O_BINARY for __CYGWIN32__. * hash/dbm.c: Added O_BINARY for __CYGWIN32__. * hash/hash.c: Added O_BINARY for __CYGWIN32__. * hash/hsearch.c: Added O_BINARY for __CYGWIN32__. * include/db-int.h: Added O_BINARY for __CYGWIN32__. * recno/rec_open.c: Added O_BINARY for __CYGWIN32__. * test/dbtest.c: Added O_BINARY for __CYGWIN32__. * test/SEQ_TEST/t.c: Added O_BINARY for __CYGWIN32__. * test/btree.tests/main.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/driver2.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/tcreat3.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/tdel.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/thash4.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/tread2.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/tseq.c: Added O_BINARY for __CYGWIN32__. * test/hash1.tests/tverify.c: Added O_BINARY for __CYGWIN32__. * test/hash2.tests/bigtest.c: Added O_BINARY for __CYGWIN32__. * test/hash2.tests/passtest.c: Added O_BINARY for __CYGWIN32__. Changes originally by Jeremy Allison (jra@cygnus.com) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10364 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/db2/recno')
-rw-r--r--src/util/db2/recno/rec_open.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/db2/recno/rec_open.c b/src/util/db2/recno/rec_open.c
index fccaacc90..f18a1cb02 100644
--- a/src/util/db2/recno/rec_open.c
+++ b/src/util/db2/recno/rec_open.c
@@ -68,7 +68,7 @@ __rec_open(fname, flags, mode, openinfo, dflags)
int rfd, sverrno;
/* Open the user's file -- if this fails, we're done. */
- if (fname != NULL && (rfd = open(fname, flags, mode)) < 0)
+ if (fname != NULL && (rfd = open(fname, flags | O_BINARY, mode)) < 0)
return (NULL);
/* Create a btree in memory (backed by disk). */
@@ -85,9 +85,9 @@ __rec_open(fname, flags, mode, openinfo, dflags)
btopeninfo.prefix = NULL;
btopeninfo.lorder = openinfo->lorder;
dbp = __bt_open(openinfo->bfname,
- O_RDWR, S_IRUSR | S_IWUSR, &btopeninfo, dflags);
+ O_RDWR | O_BINARY, S_IRUSR | S_IWUSR, &btopeninfo, dflags);
} else
- dbp = __bt_open(NULL, O_RDWR, S_IRUSR | S_IWUSR, NULL, dflags);
+ dbp = __bt_open(NULL, O_RDWR | O_BINARY, S_IRUSR | S_IWUSR, NULL, dflags);
if (dbp == NULL)
goto err;
@@ -130,7 +130,7 @@ __rec_open(fname, flags, mode, openinfo, dflags)
default:
goto einval;
}
-slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL)
+slow: if ((t->bt_rfp = fdopen(rfd, "rb")) == NULL)
goto err;
F_SET(t, R_CLOSEFP);
t->bt_irec =