summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-05 04:05:42 +0000
committerMichi Henning <michi@zeroc.com>2002-07-05 04:05:42 +0000
commitbb1b84d1436f26eb8c1941eedb97e943e81947bb (patch)
tree0dd48ac1ce692218bcb9e6578e6d7f5bee1ea2ba /cpp/src/Slice/CPlusPlusUtil.cpp
parentAdded "i64" suffix for 64-bit integer literals. (diff)
downloadice-bb1b84d1436f26eb8c1941eedb97e943e81947bb.tar.bz2
ice-bb1b84d1436f26eb8c1941eedb97e943e81947bb.tar.xz
ice-bb1b84d1436f26eb8c1941eedb97e943e81947bb.zip
Changed the way 64-bit literals are done in the generated code. The
approach used now (a macro) makes the generated source more readable than the previous one.
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 0c800c87ac4..79725c6f4b4 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -88,6 +88,26 @@ Slice::printVersionCheck(Output& out)
}
void
+Slice::printDefInt64Macro(Output& out)
+{
+ out << "\n";
+ out << "\n#if defined(_WIN32)";
+ out << "\n# define INT64LITERAL(n) n##i64";
+ out << "\n#elif defined(__linux__) && defined(i386)";
+ out << "\n# define INT64LITERAL(n) n##LL";
+ out << "\n#else";
+ out << "\n# error \"Unsupported operating system or platform!\"";
+ out << "\n#endif";
+}
+
+void
+Slice::printUndefInt64Macro(Output& out)
+{
+ out << "\n";
+ out << "\n#undef INT64LITERAL";
+}
+
+void
Slice::printDllExportStuff(Output& out, const string& dllExport)
{
if(dllExport.size())