summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-05-04 12:07:54 +0200
committerUlf Hermann <[email protected]>2017-05-08 09:36:02 +0000
commit0cfab8d6e47c165ee02d027c11b9a11c726516fa (patch)
tree07868d226de62c4f9fd80ddb7882fe19151445b0 /lib
parent8ac52d75d47da355c4ace3224161de097db3e8d9 (diff)
Open files in O_BINARY
If O_BINARY is not defined, define it to 0, so that the change has no effect then. Some systems have separate binary and text modes for files, and we don't want the text mode to be used. Change-Id: If7efb5bd448c2a1c7d1eb5dab276849b1b15a3ce Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/eu-config.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 321513ca..9fa8ff0f 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,5 +1,9 @@
2017-05-04 Ulf Hermann <[email protected]>
+ * eu-config.h: Define O_BINARY to 0 if it doesn't exist.
+
+2017-05-04 Ulf Hermann <[email protected]>
+
* eu-config.h: Define unlocked I/O functions to locked ones if they
are unavailable.
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 65300442..f2d91753 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -234,4 +234,8 @@ asm (".section predict_data, \"aw\"; .previous\n"
#define putchar_unlocked(x) putchar (x)
#endif
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#endif /* eu-config.h */