From 68b17b416124cdd2d2df3acd70746e229901af39 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 30 Apr 2005 09:51:12 +0000 Subject: [PATCH] always open with rb/wb when it is a binary file ... unix and windows will work alike with this ... git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@455 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_open.c | 8 -------- src/rrd_update.c | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/rrd_open.c b/src/rrd_open.c index 98a52e0..a411ddf 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -78,17 +78,9 @@ rrd_open(const char *file_name, FILE **in_file, rrd_t *rrd, int rdwr) rrd_init(rrd); if (rdwr == RRD_READONLY) { -#if defined(WIN32) mode = "rb"; -#else - mode = "r"; -#endif } else { -#if defined(WIN32) mode = "rb+"; -#else - mode = "r+"; -#endif } if (((*in_file) = fopen(file_name,mode)) == NULL ){ diff --git a/src/rrd_update.c b/src/rrd_update.c index df59666..a67a93a 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1383,11 +1383,7 @@ _rrd_update(char *filename, char *template, int argc, char **argv, * critical except during the burning cycles. */ if (schedule_smooth) { -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) rrd_file = fopen(filename,"rb+"); -#else - rrd_file = fopen(filename,"r+"); -#endif rra_start = rra_begin; for (i = 0; i < rrd.stat_head -> rra_cnt; ++i) { -- 2.11.0