KDE/kdelibs/kjsembed/kjsembed
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Wed Feb 15 22:18:26 CET 2006
SVN commit 509931 by chehrlic:
fix compile with msvc
CCMAIL: khtml-devel at kde.org
M +13 -12 global.cpp
M +3 -0 kjsembed.cpp
--- trunk/KDE/kdelibs/kjsembed/kjsembed/global.cpp #509930:509931
@@ -20,24 +20,25 @@
# include "global.h"
-#ifdef QT_ONLY
+#if QT_ONLY
# include <QObject>
# include <cstdio>
-# ifdef _WIN32
-# include <windows.h>
-# include <fcntl.h>
-# include <io.h>
-# include <iostream.h>
-# include <QFile>
-# include <QTextStream>
-# endif
#endif
+#if defined(_WIN32) || defined(_WIN64)
+# include <windows.h>
+# include <fcntl.h>
+# include <io.h>
+# include <ios>
+# include <QFile>
+# include <QTextStream>
+#endif
+
static QTextStream *kjsembed_err = 0L;
static QTextStream *kjsembed_in = 0L;
static QTextStream *kjsembed_out = 0L;
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(_WIN64)
char *itoa(int num, char *str, int /*radix*/)
{
int k;
@@ -66,7 +67,7 @@
#endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(_WIN64)
static QFile win32_stdin;
static QFile win32_stdout;
static QFile win32_stderr;
@@ -94,7 +95,7 @@
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
win32_stderr.open(IO_WriteOnly,hConHandle);
- ios::sync_with_stdio();
+ std::ios::sync_with_stdio();
}
--- trunk/KDE/kdelibs/kjsembed/kjsembed/kjsembed.cpp #509930:509931
@@ -40,8 +40,10 @@
/**
* Implement QString-KJS::UString conversion methods. These methods are declared
* by KJS, but libkjs doesn't actually contain their implementations.
+* because we link against khtml , those functions are already implemented there.
*
*/
+#if !defined(_WIN32) && !defined(_WIN64)
namespace KJS {
UString::UString( const QString &d )
@@ -63,6 +65,7 @@
}
}
+#endif
namespace KJSEmbed {
More information about the Khtml-devel
mailing list