Author: tfaber
Date: Tue May 1 17:20:47 2012
New Revision: 56470
URL:
http://svn.reactos.org/svn/reactos?rev=56470&view=rev
Log:
[WINE]
- Import isinf and isnan implementations from libwine_port and adjust port.h and config.h
to support them
- Remove isinf/isnan hacks from jscript and wined3d build files
- Add missing port.h include to jscript/array.c (sent and applied upstream)
See issue #7027 for more details.
Added:
trunk/reactos/lib/3rdparty/libwine/isinf.c (with props)
trunk/reactos/lib/3rdparty/libwine/isnan.c (with props)
Modified:
trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt
trunk/reactos/dll/win32/jscript/CMakeLists.txt
trunk/reactos/dll/win32/jscript/array.c
trunk/reactos/include/reactos/wine/config.h
trunk/reactos/include/reactos/wine/port.h
trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt
Modified: trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/C…
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] Tue May 1 17:20:47
2012
@@ -5,11 +5,6 @@
-DUSE_WIN32_OPENGL)
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
-if(MSVC)
- add_definitions(-Disnan=_isnan)
- add_definitions(-Disinf=!_finite)
-endif()
spec2def(wined3d.dll wined3d.spec ADD_IMPORTLIB)
Modified: trunk/reactos/dll/win32/jscript/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] Tue May 1 17:20:47 2012
@@ -6,9 +6,7 @@
add_definitions(
-D__WINESRC__
- -D_USE_MATH_DEFINES
- -Disinf=!_finite
- -Disnan=_isnan)
+ -D_USE_MATH_DEFINES)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
@@ -18,29 +16,28 @@
list(APPEND SOURCE
activex.c
+ array.c
+ bool.c
date.c
dispex.c
engine.c
error.c
+ function.c
+ global.c
jscript.c
jscript_main.c
jsutils.c
lex.c
- parser.tab.c
math.c
number.c
object.c
+ parser.tab.c
regexp.c
string.c
- array.c
- bool.c
- function.c
- global.c
+ rsrc.rc
${CMAKE_CURRENT_BINARY_DIR}/jscript.def)
-add_library(jscript SHARED
- ${SOURCE}
- rsrc.rc)
+add_library(jscript SHARED ${SOURCE})
set_module_type(jscript win32dll)
@@ -63,10 +60,4 @@
add_dependencies(jscript stdole2)
add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
-if(NOT MSVC)
- # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- #allow_warnings(jscript)
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS
"-Wno-error")
-endif()
-
set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/jsglobal.tlb)
Modified: trunk/reactos/dll/win32/jscript/array.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/array.c?…
==============================================================================
--- trunk/reactos/dll/win32/jscript/array.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jscript/array.c [iso-8859-1] Tue May 1 17:20:47 2012
@@ -16,6 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "wine/config.h"
+#include "wine/port.h"
+
#include <math.h>
#include "jscript.h"
Modified: trunk/reactos/include/reactos/wine/config.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/confi…
==============================================================================
--- trunk/reactos/include/reactos/wine/config.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/config.h [iso-8859-1] Tue May 1 17:20:47 2012
@@ -299,10 +299,10 @@
#define HAVE_IO_H 1
/* Define to 1 if you have the `isinf' function. */
-#define HAVE_ISINF 1
+/* #undef HAVE_ISINF */
/* Define to 1 if you have the `isnan' function. */
-#define HAVE_ISNAN 1
+/* #undef HAVE_ISNAN */
/* Define to 1 if you have the <jack/jack.h> header file. */
/* #undef HAVE_JACK_JACK_H */
@@ -1139,6 +1139,12 @@
/* Define to 1 if you have the <zlib.h> header file. */
/* #define HAVE_ZLIB_H 1 */
+
+/* Define to 1 if you have the `_finite' function. */
+#define HAVE__FINITE 1
+
+/* Define to 1 if you have the `_isnan' function. */
+#define HAVE__ISNAN 1
/* Define to 1 if you have the `_pclose' function. */
#define HAVE__PCLOSE 1
Modified: trunk/reactos/include/reactos/wine/port.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.…
==============================================================================
--- trunk/reactos/include/reactos/wine/port.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/port.h [iso-8859-1] Tue May 1 17:20:47 2012
@@ -226,6 +226,14 @@
size_t getpagesize(void);
#endif /* HAVE_GETPAGESIZE */
+#if !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf)
+int isinf(double x);
+#endif
+
+#if !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan)
+int isnan(double x);
+#endif
+
#ifndef HAVE_LSTAT
int lstat(const char *file_name, struct stat *buf);
#endif /* HAVE_LSTAT */
Modified: trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/CMake…
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt [iso-8859-1] Tue May 1 17:20:47
2012
@@ -5,6 +5,8 @@
list(APPEND SOURCE
config.c
debug_ros.c
+ isinf.c
+ isnan.c
loader.c
wctype.c
register.c
Added: trunk/reactos/lib/3rdparty/libwine/isinf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/isinf…
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/isinf.c (added)
+++ trunk/reactos/lib/3rdparty/libwine/isinf.c [iso-8859-1] Tue May 1 17:20:47 2012
@@ -1,0 +1,46 @@
+/*
+ * isinf function
+ *
+ * Copyright 2008 Petr Sumbera
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#if !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf)
+
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+
+int isinf(double x)
+{
+ return (!(finite(x) || isnand(x)));
+}
+
+#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN) &&
defined(HAVE__FINITE)
+#include <float.h>
+
+int isinf(double x)
+{
+ return (!(_finite(x) || _isnan(x)));
+}
+
+#else
+#error No isinf() implementation available.
+#endif
+
+#endif /* !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf) */
Propchange: trunk/reactos/lib/3rdparty/libwine/isinf.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/lib/3rdparty/libwine/isnan.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/isnan…
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/isnan.c (added)
+++ trunk/reactos/lib/3rdparty/libwine/isnan.c [iso-8859-1] Tue May 1 17:20:47 2012
@@ -1,0 +1,46 @@
+/*
+ * isnan function
+ *
+ * Copyright 2008 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#if !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan)
+
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+
+int isnan(double x)
+{
+ return isnand(x);
+}
+
+#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN)
+#include <float.h>
+
+int isnan(double x)
+{
+ return _isnan(x);
+}
+
+#else
+#error No isnan() implementation available.
+#endif
+
+#endif /* !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan) */
Propchange: trunk/reactos/lib/3rdparty/libwine/isnan.c
------------------------------------------------------------------------------
svn:eol-style = native