From 1f8b2ca3c2bd5645e0a8891bf74707582a76ca50 Mon Sep 17 00:00:00 2001 From: borutr Date: Thu, 29 Aug 2002 18:33:59 +0000 Subject: [PATCH] re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2091 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ support/cpp2/auto-host_vc_in.h | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index deccf639..da88c07f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2002-08-29 Borut Razem + * sdcc/support/cpp2/auto-host_vc_in.h: + re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem + with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC. + Maybe there is a similar problem with BORLANDC? It should be checked! + * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c: corrected improper use of assert: the assignment to clr variable was done inside the assert. In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment diff --git a/support/cpp2/auto-host_vc_in.h b/support/cpp2/auto-host_vc_in.h index 4f88522c..a31baded 100644 --- a/support/cpp2/auto-host_vc_in.h +++ b/support/cpp2/auto-host_vc_in.h @@ -52,6 +52,17 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/ #define close _close #define read _read #define write _write + +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_EXCL _O_EXCL +#define O_RDONLY _O_RDONLY +#define O_RDWR _O_RDWR +#define O_TRUNC _O_TRUNC +#define O_WRONLY _O_WRONLY +#define O_BINARY _O_BINARY +#define O_TEXT _O_TEXT + /*This one borrowed from \borland\bcc55\include\sys\stat.h*/ #define S_IFBLK 0x3000 /* block special */ -- 2.30.2