]> git.gag.com Git - fw/sdcc/commitdiff
MS VC6 Port
authorjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Jan 2001 02:49:27 +0000 (02:49 +0000)
committerjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Jan 2001 02:49:27 +0000 (02:49 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@520 4a8a32a2-be11-0410-ad9d-d568d2c75423

46 files changed:
as/mcs51/asdata.c
as/mcs51/asexpr.c
as/mcs51/aslex.c
as/mcs51/aslist.c
as/mcs51/asmain.c
as/mcs51/asnoice.c
as/mcs51/asout.c
as/mcs51/asstore.c
as/mcs51/assubr.c
as/mcs51/assym.c
as/mcs51/lkarea.c
as/mcs51/lkdata.c
as/mcs51/lkeval.c
as/mcs51/lkhead.c
as/mcs51/lkihx.c
as/mcs51/lklex.c
as/mcs51/lklibr.c
as/mcs51/lklist.c
as/mcs51/lkmain.c
as/mcs51/lknoice.c
as/mcs51/lkrloc.c
as/mcs51/lks19.c
as/mcs51/lkstore.c
as/mcs51/lksym.c
as/z80/asdata.c
as/z80/asexpr.c
as/z80/aslex.c
as/z80/aslist.c
as/z80/asmain.c
as/z80/asout.c
as/z80/assubr.c
as/z80/assym.c
packihx/packihx.c
src/SDCCglobl.h
src/SDCCglue.c
src/SDCCicode.c
src/SDCCmain.c
src/SDCCset.h
src/avr/gen.c
src/ds390/gen.c
src/mcs51/gen.c
src/pic/gen.c
support/cpp/config.h
support/cpp/cppexp.c
support/cpp/cpplib.c
support/cpp/cpplib.h

index f1abb1ebd9fc68a67fa12a96ad8214b9d0f0fc8c..140bcf4976baf2c79ae02260bd42bf17b849c4b3 100644 (file)
@@ -17,7 +17,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      asdata.c
index e675be354abeaa5a5f17ab0eea593a032695526b..dd9b0b8cc9ac919afdfb6cb55bc0e6b95f85570f 100644 (file)
@@ -1,4 +1,4 @@
-/* asexpr.c */
+       /* asexpr.c */
 
 /*
  * (C) Copyright 1989-1995
@@ -12,7 +12,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      asexpr.c
index 12dade5f97aa93fecbc03a02ad82ed059a54904a..cd43a97b94acf7e7b063656f76df7e94e8161903 100644 (file)
@@ -15,7 +15,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      aslex.c
@@ -163,7 +165,7 @@ char *id;
        do {
                if (p < &id[NCPS])
                        *p++ = c;
-       } while (ctype[c=get()] & (0xFF - (SPACE|ILL)));
+       } while (ctype[c=get()] &       (~(SPACE|ILL)));
        unget(c);
        while (p < &id[NCPS])
                *p++ = 0;
index 4d03fc2a971367bb2f23d68df9df3f03792a0da9..6a6cf7c916e9d02e0243c4122184fa62d12eba99 100644 (file)
@@ -15,7 +15,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include <stdlib.h>
 #include "asm.h"
 
index 32cde0eb35486d569e3c437a819ddd17e7bc2e2e..d37a9e707fc900048e16a80fdd22882a634f2ddb 100644 (file)
@@ -14,7 +14,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 extern VOID machine(struct mne *);
@@ -1147,9 +1149,9 @@ char *usetxt[] = {
        "  a    all user symbols made global",
        "  l    create list   output file1[LST]",
        "  o    create object output file1[REL]",
-        "  s    create symbol output file1[SYM]",
-        "  p    disable listing pagination",
-        "  f    flag relocatable references by `    in listing file",
+       "  s    create symbol output file1[SYM]",
+       "  p    disable listing pagination",
+       "  f    flag relocatable references by `    in listing file",
        " ff    flag relocatable references by mode in listing file",
        "",
        0
index a9465426c98bc60dce9f43f86e92815bccdfe5e2..4611587cbab6202e3cf8ccbd41dce7ec2082d467 100644 (file)
@@ -9,7 +9,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /* Return basic file name without path or extension */
index 90a80afafded63257e860212bda21875a3a2bea3..c21b4ac285369663aea7027c50960dd54200d2af 100644 (file)
@@ -16,7 +16,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 
index 0bccc91af825403e213eea697f31e9471c4cb853..4e3947308216895a5c62200f1b8cd3aa418addb5 100644 (file)
@@ -3,7 +3,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*
index a5026e74593b0ef87e0d3010fe3d549811c11cbc..95a425e73a09f0d4530bf203b40c5b41bdd7d0e3 100644 (file)
@@ -12,7 +12,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      assubr.c
index 38be7ffbe44753dac598a30bc218ab86372ea621..3bc66141a988b0c461ecf6b163d01024fff75fc8 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if defined(_MSC_VER)
+#include <malloc.h>
+#else
 #include <alloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      assym.c
index b535f2599b7f7c38f2c9c01881fadf80ed866144..90f9c887b6b96a4bfb81e44c689b9e9585b2d3f9 100644 (file)
@@ -15,7 +15,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lkarea.c
index 97a2e8474c6bf948559050d8755c981e4e5173be..0c325b2bc2ace2e0989776a5779be96295d5ef9f 100644 (file)
@@ -16,7 +16,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lkdata.c
index c33a58aa58322847ddb1ccccd372909f5adba2de..573c3515aa8ff37048a0b775a489b5719b61e04e 100644 (file)
@@ -11,7 +11,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lkeval.c
index 69e77376cc16cb62f1ec7433e138078de669e4b4..da8d5d04219a5dddbb6d7f5acb84e1175b796c40 100644 (file)
@@ -11,7 +11,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*Module       lkhead.c
index 77d7b9acac7881c085de6f95d32dea3b692d02ea..2258de133087a123397c2178a05ac798c837e803 100644 (file)
@@ -11,7 +11,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lkihx.c
index 55765c6186d64f4b53c4752925a8e70fbbe95bd8..5e894e152af37f56d80a81405cf1d094a54570e1 100644 (file)
@@ -11,7 +11,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lklex.c
index 5e57c813e320361115c4dbf6e5de29a3617511f3..000843eed9a78796a77761ed39c9ee0c6ad6b164 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+#if defined(_MSC_VER)
+#include <malloc.h>
+#else
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lklibr.c
index 31f134232929f42ca526e666bf08f407163a001f..7c28764acb9190c8f3e73c0a3c11c73aa61f8b24 100644 (file)
@@ -17,7 +17,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include <stdlib.h>
 #include "aslink.h"
 
index d7e04197b45215a1bf260a75216c3dcc67410129..96f48736b380e0c6e988044ea081429cc809bcd7 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+#if defined(_MSC_VER)
+#include <stdlib.h>
+#else
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /* yuck - but including unistd.h causes problems on Cygwin by redefining
index 22e2d96c507dd1ffad14f1f342dd394a42a07d71..04500dd92bb2b3eda97ea45a2426d55a56d0bdc5 100644 (file)
@@ -11,7 +11,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 static void DefineGlobal( char *name, addr_t value, int page );
index b102545d1635bb21dbffefe1bd6a6cc78bdad438..1a17b9fb03ff6d001cc1e8cd52b6bdfe943d71ef 100644 (file)
@@ -16,7 +16,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lkrloc.c
index cfbb5d18fc29f60bea5ddbaaeaf141fba071ab3f..d75d2f9bcb5c563ca96dc043fe85d2e390b639ee 100644 (file)
@@ -11,7 +11,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lks19.c
index 69ffd0021a6852bf7700f634f5e8ad616cb4912e..73c21d01508345f3acbe3b7fe18b73acb4bcecf8 100644 (file)
@@ -9,7 +9,9 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*
index 3c54980e2d64950c42313a5b83f2d8ec37bc0204..7e3321eb8574a0d88eb96ab11664fb3d86dff7b4 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+#if defined(_MSC_VER)
+#include <malloc.h>
+#else
 #include <alloc.h>
+#endif
 #include "aslink.h"
 
 /*)Module      lksym.c
index eaff461af4c190feae2d66d6eae861d60641a386..4731d1d9a60d78125eef703313ebac2de4771126 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      asdata.c
index 009e3e1ee263d61b6a65ad6406e148e6abaa0dfb..4490cdc3f80fa261be93154a2513a7c08dcc18f2 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      asexpr.c
index c6cbbd7a85d2093d6e3218102eca05e94985307e..4f764dd6733f667a26b3efd79d657e3d95c66603 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      aslex.c
index e0e29f3ad8f81f17c5fd65859b1e9593aa95800b..d65660fe238fd4dc4b06620e1c9b0c16c632de75 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if defined(_MSC_VER)
+#include <malloc.h>
+#else
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      aslist.c
index e1686ccc8c76b33d9d9b65554efc50d30b40a1e2..6bde5db2ceef5f04d143accfcf467f7413b46da0 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #ifdef SDK
 #include <stdlib.h>
 #include <math.h>
index e91ba04b6de7c4f8a2fe2aa2117982d8e8cb30ba..5e4c57fe105b583c9d5b8a968c730bfdf146e993 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 
index 132f2387850f9860772b26c7d7f9e60e1d2f53e1..29c37416353b1c6c1d9ab6684950a686c2420edc 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if !defined(_MSC_VER)
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      assubr.c
index cc7c08f71fae9df7fb9c880fdf3fd99281bec8e8..3aba5c280b7f6cba7bc25ded1968d185e026127b 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+
+#if defined(_MSC_VER)
+#include <malloc.h>
+#else
 #include <alloc.h>
+#endif
+
 #include "asm.h"
 
 /*)Module      assym.c
index 77a1a0b8dbe891d43e8c068f9c37af3b8efde611..72ac34f22d27c11e6dde419e4534837ac76cf2d9 100644 (file)
 #include <ctype.h>
 #include <assert.h>
 
+#if defined(_MSC_VER)
+
+typedef unsigned char Uint8 ;
+typedef unsigned Uint16 ;
+
+#else
+
 #include "config.h"
+#endif
 
 /* A cooked line of input. */
 typedef struct _Line
index d04271339daf0beddff777e87504c76d2816fb2c..6e2b62133d5989dbc60847c0cf1330085a4f0f3b 100644 (file)
@@ -6,12 +6,23 @@
 #include <stdlib.h>
 #include <setjmp.h>
 #include <stdio.h>
-#include "sdccconf.h"
+
+#if defined(_MSC_VER)
+#      include "sdcc_vc.h"
+#else
+#      include "sdccconf.h"
+#endif // _MSC_VER
+
 #include "SDCCerr.h"
 
+#if defined(_MSC_VER)
+#      define NATIVE_WIN32             1
+#endif
+
 #ifdef __BORLANDC__
 #define NATIVE_WIN32           1
 #endif
+
 #ifdef __MINGW32__
 #define NATIVE_WIN32           1
 #endif
index bb7ef5e9ea764ae79d485ca8d3556a12a0b294b3..f07bcb74446f4178ccc16de54bae0a2dd3091884 100644 (file)
 #include "asm.h"
 #include <time.h>
 
-#ifndef __BORLANDC__
+#if    !defined(__BORLANDC__) && !defined(_MSC_VER)
 #if 0 /* This should no longer be necessary. */
 // This is a bit messy because we define link ourself
 #define link NoLiNk
 #include <unistd.h>
 #undef link
 #else
+
 #include <unistd.h>
 #endif
 #else
index d2ca13ec2418cd149c49e8b106c2582442f7f2dc..ecbb2b8da3f126b4b285b1472af7e1f5b58672de 100644 (file)
@@ -2138,7 +2138,7 @@ operand *geniCodeRightShift (operand *left, operand *right)
     return IC_RESULT(ic) ;  
 }
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(_MSC_VER)
 #define LONG_LONG __int64
 #else
 #define LONG_LONG long long
index 514a54f7ffa5f478f4cd4365e584d4f07e15b89b..b316ad1a59c9d8ed0e0377bbf304d35435d50085 100644 (file)
 #endif
 
 // This is a bit messy because we define link ourself
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
+
+#if 0          // Wasn't this fixed already
 #define link NoLiNk
 #include <unistd.h>
 #undef link
+#endif
+
 #else
 // No unistd.h in Borland C++
 extern int access(const char *, int);
@@ -1054,7 +1058,17 @@ int   parseCmdLine ( int argc, char **argv )
 /*-----------------------------------------------------------------*/
 /* my_system - will call a program with arguments                  */
 /*-----------------------------------------------------------------*/
+
+#if defined(_MSC_VER)
+
+char *try_dir[]= {NULL};                       // TODO : Fill in some default search list
+
+#else
+
 char *try_dir[]= {SRCDIR "/bin",PREFIX "/bin", NULL};
+
+#endif
+
 int my_system (const char *cmd, char **cmd_argv)
 {    
     char *dir, *got= NULL; int i= 0;
@@ -1104,7 +1118,10 @@ int my_system (const char *cmd, char **cmd_argv)
     }
 
     if (got)
+               {
       i= spawnv(P_WAIT,got,cmd_argv) == -1;
+               free(got) ;
+               }
     else
       i= spawnvp(P_WAIT,cmd,cmd_argv) == -1;
     if (i) {
index f676886710b2ebe343e84f8a9ae9870c26c4adc8..f60664e771026eb6cab92048ff862fcda5c5d975 100644 (file)
 #ifndef SDCCSET_H
 #define SDCCSET_H
 #include <stdarg.h>
-#include "sdccconf.h"
+
+#if defined(_MSC_VER)
+#      include "sdcc_vc.h"
+#else
+#      include "sdccconf.h"
+#endif         // _MSC_VER
+
 #include "SDCCalloc.h"
 
 
index 2f815ffda2efd7f6108910fb899505f95a9363e0..1e769c744814978dcb83fef7713f3194435b5b42 100644 (file)
@@ -36,7 +36,7 @@
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
 #warning "Cannot determine ENDIANESS of this machine assuming LITTLE_ENDIAN"
 #warning "If you running sdcc on an INTEL 80x86 Platform you are okay"
 #endif
@@ -330,10 +330,12 @@ static asmop *aopForSym (iCode *ic,symbol *sym,bool result)
 
        /* only remaining is code / eeprom which will need pointer reg */
        /* if it is in code space */
+
+       sym->aop = aop = newAsmop(0);
+
        if (IN_CODESPACE(space))
                aop->code = 1;
 
-       sym->aop = aop = newAsmop(0);
        aop->aopu.aop_ptr = getFreePtr(ic,&aop,result,aop->code);
        aop->size = getSize(sym->type);
        emitcode ("ldi","%s,lo8(%s)",aop->aopu.aop_ptr->name,sym->rname);
@@ -1440,7 +1442,7 @@ static int resultRemat (iCode *ic)
        return 0;
 }
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(_MSC_VER)
 #define STRCASECMP stricmp
 #else
 #define STRCASECMP strcasecmp
index 3dd76255c5530c387261d1e640a6f3fc3306908c..0946102d8487510105538582d957662ba96429cc 100644 (file)
@@ -43,7 +43,7 @@
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
 #warning "Cannot determine ENDIANESS of this machine assuming LITTLE_ENDIAN"
 #warning "If you running sdcc on an INTEL 80x86 Platform you are okay"
 #endif
@@ -2286,7 +2286,7 @@ static int resultRemat (iCode *ic)
     return 0;
 }
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(_MSC_VER)
 #define STRCASECMP stricmp
 #else
 #define STRCASECMP strcasecmp
index 04e3e39219f74c8d97895a530565eb983d71a73c..1f940d961ddb59754f4973255c52a0a0dd058e73 100644 (file)
@@ -40,7 +40,7 @@
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
 #warning "Cannot determine ENDIANESS of this machine assuming LITTLE_ENDIAN"
 #warning "If you running sdcc on an INTEL 80x86 Platform you are okay"
 #endif
@@ -1958,7 +1958,7 @@ static int resultRemat (iCode *ic)
     return 0;
 }
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(_MSC_VER)
 #define STRCASECMP stricmp
 #else
 #define STRCASECMP strcasecmp
index fa03b64a543f75f181c83a929a2d0e78134290ff..2c506e6daabf4e2cdbba12251e842637b88a4193 100644 (file)
 #include <ctype.h>
 #include "SDCCglobl.h"
 
+#if defined(_MSC_VER)
+#define __FUNCTION__           __FILE__
+#endif
+
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
 #warning "Cannot determine ENDIANESS of this machine assuming LITTLE_ENDIAN"
 #warning "If you running sdcc on an INTEL 80x86 Platform you are okay"
 #endif
@@ -2088,7 +2092,7 @@ static int resultRemat (iCode *ic)
     return 0;
 }
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(_MSC_VER)
 #define STRCASECMP stricmp
 #else
 #define STRCASECMP strcasecmp
index 91bf22f71d0a1d8434e490f617b0e83bd1a04853..47df72ee8a1e67ad096c98b00b43aafe63dc1099 100644 (file)
@@ -1,3 +1,16 @@
+#if defined(_MSC_VER)
+
+#include <stdlib.h>
+#include "i386/i386.h" 
+#include "i386/xm-i386.h"
+#define bcopy(s, d, n)  memcpy(d, s, n)
+#define bcmp memcmp
+#define bzero(p, l) memset(p, 0, l)
+#define index strchr
+#define rindex strrchr
+
+#else
+
 #include "i386/i386.h" 
 #include "i386/xm-linux.h"  
 
@@ -13,4 +26,4 @@
 #define rindex strrchr
 #endif
 
-
+#endif // _MSC_VER
\ No newline at end of file
index 4d4b1d2b54f94334372971f69e48792caa1de9f1..54fb434b3a1d9747a6f52449d0b17bedb0ec47ce 100644 (file)
@@ -24,6 +24,10 @@ Written by Per Bothner 1994. */
 
 /* Parse a C expression from text in a string  */
 
+#if defined(_MSC_VER)
+#include <malloc.h>
+#endif
+
 #include "config.h"   
 #include "cpplib.h"
 
index 0b3a28aeeaabbaa1118ff6fa67ed40a7c663878f..c395b83490df77e775e4fd84eab9f7d5b6153214 100644 (file)
@@ -22,8 +22,17 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  You are forbidden to forbid anyone else to use, share and improve
  what you give them.   Help stamp out software-hoarding!  */
 
+#if defined(_MSC_VER)
+
+#include "..\..\sdcc_vc.h"
+#include <io.h>
+
+#else
+
 #include "sdccconf.h"
 
+#endif
+
 #ifdef EMACS
 #define NO_SHORTNAMES
 #include "../src/config.h"
@@ -86,6 +95,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #else
 #ifndef VMS
 #ifndef USG
+#if !defined(_MSC_VER)
 #include <sys/time.h>          /* for __DATE__ and __TIME__ */
 #include <sys/resource.h>
 #else
@@ -93,6 +103,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 // #include <sys/times.h>
 #include <time.h>
 #include <fcntl.h>
+#endif  // _MSC_VER
 #endif /* USG */
 #endif /* not VMS */
 #endif
index 39c0ed7d6a2628f091622dbc85e43be4a85f61ff..321e157a1e1aa3275ec6de348d056a3d07b8b4f1 100644 (file)
@@ -100,7 +100,7 @@ extern int cpp_handle_options PARAMS ((cpp_reader*, int, char**));
 extern enum cpp_token cpp_get_token PARAMS ((struct parse_marker*));
 extern void cpp_skip_hspace PARAMS((cpp_reader*));
 extern enum cpp_token cpp_get_non_space_token PARAMS ((cpp_reader *));
-
+extern int cpp_read_check_assertion (cpp_reader *pfile) ;
 
 /* Maintain and search list of included files, for #import.  */