diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-10-29 17:55:00 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-10-29 17:55:00 +0000 |
commit | c214064a84ab2d988c086fc9da9c2e03d4c06c62 (patch) | |
tree | bbfd2d16ac9f70434a4a8cb683199d13e87ce67c /cpp/src | |
parent | Fixed the translators to use the icecpp C preprocessor. (diff) | |
download | ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.tar.bz2 ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.tar.xz ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.zip |
Windows fixes
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 10 | ||||
-rw-r--r-- | cpp/src/icecpp/icecpp.dsp | 48 |
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
|