git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3057
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-12-14 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+ * support/makebin/makebin.c: put output in binary mode
+
2003-12-13 Frieder Ferlemann <Frieder.Ferlemann@web.de>
* src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
#include <stdlib.h>
#include <string.h>
+#if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__CYGWIN__)
+ #include <fcntl.h>
+ #include <io.h>
+#endif
+
+
typedef unsigned char BYTE;
#define FILL_BYTE 0xFF
"Usage: makebin [-p] [-s romsize] [-h]\n");
}
+void fixStdout(void)
+{
+ #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__CYGWIN__)
+ setmode(fileno(stdout), O_BINARY);
+ #endif
+}
+
+
int main(int argc, char **argv)
{
int size = 32768, pack = 0, real_size = 0;
argc--;
argv++;
+ fixStdout();
+
while (argc--) {
if (**argv != '-') {
usage();