From 2982d4118de6e20a41be0b9babd7080a7146e408 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Thu, 11 Jun 2015 13:10:33 +0000 Subject: [PATCH] fixed the fopen mode --- stix/lib/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stix/lib/main.c b/stix/lib/main.c index 06c9206..271aed3 100644 --- a/stix/lib/main.c +++ b/stix/lib/main.c @@ -80,13 +80,21 @@ static STIX_INLINE stix_ssize_t open_input (stix_t* stix, stix_ioarg_t* arg) return -1; } +#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) + arg->handle = fopen (bcs, "rb"); +#else arg->handle = fopen (bcs, "r"); +#endif } else { /* main stream */ xtn_t* xtn = stix_getxtn(stix); +#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) + arg->handle = fopen (xtn->source_path, "rb"); +#else arg->handle = fopen (xtn->source_path, "r"); +#endif } if (!arg->handle)