summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp10
-rw-r--r--cpp/src/icecpp/icecpp.dsp48
2 files changed, 53 insertions, 5 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 532ed8be9d6..c73765164a1 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -171,18 +171,26 @@ Slice::Preprocessor::checkInputFile()
string
Slice::Preprocessor::searchIceCpp()
{
+#ifndef WIN32
const char* icecpp = "icecpp";
+#else
+ const char* icecpp = "icecpp.exe";
+#endif
string::size_type pos = _path.find_last_of("/\\");
if(pos != string::npos)
{
string path = _path.substr(0, pos + 1);
path += icecpp;
-
+
struct stat st;
if(stat(path.c_str(), &st) == 0)
{
+#ifndef WIN32
if(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
+#else
+ if(st.st_mode & (S_IEXEC))
+#endif
{
return path;
}
diff --git a/cpp/src/icecpp/icecpp.dsp b/cpp/src/icecpp/icecpp.dsp
index ebd9a9d557c..d4fe27223aa 100644
--- a/cpp/src/icecpp/icecpp.dsp
+++ b/cpp/src/icecpp/icecpp.dsp
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/icecpp.exe" /pdbtype:sept /libpath:"../../lib"
+# ADD LINK32 setargv.obj advapi32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/icecpp.exe" /pdbtype:sept /libpath:"../../lib"
# SUBTRACT LINK32 /nodefaultlib
!ENDIF
@@ -91,11 +91,24 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
-SOURCE=.\Gen.cpp
+SOURCE=.\cccp.c
# End Source File
# Begin Source File
-SOURCE=.\Main.cpp
+SOURCE=.\cexp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\prefix.c
+
+!IF "$(CFG)" == "icecpp - Win32 Release"
+
+!ELSEIF "$(CFG)" == "icecpp - Win32 Debug"
+
+# ADD CPP /D "__STDC__"
+
+!ENDIF
+
# End Source File
# End Group
# Begin Group "Header Files"
@@ -103,12 +116,39 @@ SOURCE=.\Main.cpp
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
-SOURCE=.\Gen.h
+SOURCE=.\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\gansidecl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\pcp.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\cexp.y
+
+!IF "$(CFG)" == "icecpp - Win32 Release"
+
+!ELSEIF "$(CFG)" == "icecpp - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\cexp.y
+
+"cexp.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ bison -o cexp.c cexp.y
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
# End Group
# End Target
# End Project