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

github.com/amachronic/microtar.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-11-04 20:17:51 +0300
committerAidan MacDonald <amachronic@protonmail.com>2021-11-04 23:12:28 +0300
commitff8eddfb9c6b0d1ada8dd325b34baa742e87aba5 (patch)
tree09b410cf919ce95bcfaa591b2b16e8b4fabb5256
parent2b65975df91d389b6c8e5584a5258669ec3680a2 (diff)
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.
-rw-r--r--src/microtar-stdio.c6
1 files changed, 0 insertions, 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 <stdio.h>
-#include <string.h>
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)