From ff8eddfb9c6b0d1ada8dd325b34baa742e87aba5 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 4 Nov 2021 17:17:51 +0000 Subject: Remove incorrect attempt to enforce binary file IO This was done wrongly, and in any event it is the user's responsibility to use the right mode for the OS. --- src/microtar-stdio.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/microtar-stdio.c b/src/microtar-stdio.c index 4aed2a6..e95b030 100644 --- a/src/microtar-stdio.c +++ b/src/microtar-stdio.c @@ -23,7 +23,6 @@ #include "microtar.h" #include -#include static int file_read(void* stream, void* data, unsigned size) { @@ -58,11 +57,6 @@ static const mtar_ops_t file_ops = { int mtar_open(mtar_t* tar, const char* filename, const char* mode) { - /* Ensure mode is always binary */ - if(strchr(mode, 'r')) mode = "rb"; - if(strchr(mode, 'w')) mode = "wb"; - if(strchr(mode, 'a')) mode = "ab"; - /* Open file */ FILE* file = fopen(filename, mode); if(!file) -- cgit v1.2.3