summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
315208e)
* src/asm.c: fix pipe() for Mingw32
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2275
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-02-16 Bernhard Held <bernhard@bernhardheld.de>
+
+ * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
+ * src/asm.c: fix pipe() for Mingw32
+
2003-02-15 Bernhard Held <bernhard@bernhardheld.de>
* src/SDCCglue.h: make tmpfileNameSet available for preOutName
2003-02-15 Bernhard Held <bernhard@bernhardheld.de>
* src/SDCCglue.h: make tmpfileNameSet available for preOutName
if [ -f ${1}/devel ]; then
shift
echo "$@"
if [ -f ${1}/devel ]; then
shift
echo "$@"
#include "common.h"
#include "asm.h"
#include "common.h"
#include "asm.h"
-#if !defined(__BORLANDC__) && !defined(_MSC_VER)
-// for pipe and close
-#include <unistd.h>
+#if defined __MINGW32__
+ // for O_BINARY in _pipe()
+# include <fcntl.h>
+#elif !defined(__BORLANDC__) && !defined(_MSC_VER)
+ // for pipe and close
+# include <unistd.h>
#endif
/* A 'token' is like !blah or %24f and is under the programmers
#endif
/* A 'token' is like !blah or %24f and is under the programmers
FILE *pipeStream;
iCodeTable *icTab=getTableEntry(ic->op);
FILE *pipeStream;
iCodeTable *icTab=getTableEntry(ic->op);
+#if defined __MINGW32__
+ assert(_pipe(filedes, 256, O_BINARY)!=-1); // forget it
+#else
assert(pipe(filedes)!=-1); // forget it
assert(pipe(filedes)!=-1); // forget it
// stuff the pipe with the readable icode
pipeStream=fdopen(filedes[1],"w");
// stuff the pipe with the readable icode
pipeStream=fdopen(filedes[1],"w");