Define O_BINARY for non-Windows platforms.
All tools (aapt, aidl, dexdump, etc.) need this flag to open() binary files, or they risk reading corrupted data on Windows. A bunch of these tools just conditionaly define O_BINARY in their C files. Seems it would just make sense to define it globally. Change-Id: Ia5c0a59e9e77bbdcbce235233555f611207abed8
This commit is contained in:
parent
034117e47f
commit
bd70e4aca5
|
@ -300,4 +300,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /*_ANDROID_CONFIG_H*/
|
||||
|
|
|
@ -358,4 +358,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /*_ANDROID_CONFIG_H*/
|
||||
|
|
|
@ -354,4 +354,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /* _ANDROID_CONFIG_H */
|
||||
|
|
|
@ -318,4 +318,12 @@
|
|||
*/
|
||||
#define HAVE_PREAD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /*_ANDROID_CONFIG_H*/
|
||||
|
|
|
@ -361,4 +361,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /* _ANDROID_CONFIG_H */
|
||||
|
|
|
@ -328,4 +328,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /*_ANDROID_CONFIG_H*/
|
||||
|
|
|
@ -345,4 +345,12 @@
|
|||
*/
|
||||
#define HAVE_PRINTF_ZD 1
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* Most systems lack (and actually don't need) this flag.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#endif /* _ANDROID_CONFIG_H */
|
||||
|
|
|
@ -333,4 +333,10 @@
|
|||
*/
|
||||
/* #define HAVE_PRINTF_ZD 1 */
|
||||
|
||||
/*
|
||||
* We need to open binary files using O_BINARY on Windows.
|
||||
* We don't define it on Windows since it is part of the io headers.
|
||||
*/
|
||||
/* #define O_BINARY 0 */
|
||||
|
||||
#endif /*_ANDROID_CONFIG_H*/
|
||||
|
|
Loading…
Reference in New Issue