Get compiling with Vorland C++ for Windows
authorkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 27 Feb 2000 05:41:53 +0000 (05:41 +0000)
committerkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 27 Feb 2000 05:41:53 +0000 (05:41 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@129 4a8a32a2-be11-0410-ad9d-d568d2c75423

support/cpp/Makefile.bcc [new file with mode: 0644]
support/cpp/config.h
support/cpp/cpplib.c

diff --git a/support/cpp/Makefile.bcc b/support/cpp/Makefile.bcc
new file mode 100644 (file)
index 0000000..8b6ab2b
--- /dev/null
@@ -0,0 +1,52 @@
+# Generated automatically from Makefile.in by configure.
+#
+#
+#
+
+VERSION         = 2.2.0
+VERSIONHI       = 2
+VERSIONLO       = 2
+VERSIONP        = 0
+
+PRJDIR         = ../..
+
+srcdir         = .
+prefix         = /cygnus/cygwin-b20/kvigor/
+exec_prefix     = ${prefix}
+bindir          = ${exec_prefix}/bin
+libdir          = ${exec_prefix}/lib
+datadir         = ${prefix}/share
+includedir      = ${prefix}/include
+mandir          = ${prefix}/man
+man1dir         = $(mandir)/man1
+man2dir         = $(mandir)/man2
+infodir         = ${prefix}/info
+
+STD_INC         = @sdcc_include_dir@
+#CPPFLAGS        =  -I. -I$(PRJDIR) -D_FORASXXXX_
+#CFLAGS          = -ggdb -O2 -pipe
+CFLAGS  = -6 -O -g0 -I. -I$(PRJDIR) -D_FORASXXXX_
+M_OR_MM         = -MM
+LDFLAGS                = 
+
+OBJECTS         = cppalloc.obj cpperror.obj cppexp.obj cpphash.obj cpplib.obj cppmain.obj
+
+TARGET          = $(PRJDIR)\bin\sdcpp.exe
+
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: $(TARGET)
+
+$(TARGET): $(OBJECTS)
+        bcc32 -e$(TARGET) $(OBJECTS)
+
+!include Makefile.dep
+
+# My rules
+# --------
+.c.obj:
+        BCC32 -c $(CFLAGS) $(CPPFLAGS) $<
+
+
+# End of cpp/Makefile
index c1bbb06773d753f80019f51a5708f64dcc64e374..91bf22f71d0a1d8434e490f617b0e83bd1a04853 100644 (file)
@@ -1,4 +1,16 @@
 #include "i386/i386.h" 
 #include "i386/xm-linux.h"  
 
+#ifndef __BORLANDC__
 #define alloca malloc
+#else
+#include <string.h>
+#include <stdlib.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
+#endif
+
+
index a7f2c8ac7eeba33e7cd3f12ae54058725bd5f594..cc0b5cb2ce637bdff7cd1882b2f907c8379849e8 100644 (file)
@@ -78,6 +78,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #include <stdlib.h>
 #endif
 
+#ifdef __BORLANDC__
+#include <time.h>
+#else
 #ifndef VMS
 #ifndef USG
 #include <sys/time.h>          /* for __DATE__ and __TIME__ */
@@ -89,6 +92,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #include <fcntl.h>
 #endif /* USG */
 #endif /* not VMS */
+#endif
 
 /* This defines "errno" properly for VMS, and gives us EACCES. */
 #include <errno.h>
@@ -2157,6 +2161,7 @@ output_line_command (
   CPP_RESERVE (pfile, 4 * strlen (ip->nominal_fname) + 50);
   {
     static char sharp_line[] = "#line ";
+
     CPP_PUTS_Q (pfile, sharp_line, sizeof(sharp_line)-1);
   }