Author: tfaber Date: Sun Jan 26 21:55:59 2014 New Revision: 61847
URL: http://svn.reactos.org/svn/reactos?rev=61847&view=rev Log: [LIBWINE][WINED3D] - Import isfinite from Wine libport & hack-define copysignf -- aka fix build
Added: trunk/reactos/lib/3rdparty/libwine/isfinite.c (with props) Modified: trunk/reactos/dll/directx/wine/wined3d/utils.c trunk/reactos/include/reactos/wine/config.h trunk/reactos/include/reactos/wine/port.h trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt trunk/reactos/lib/3rdparty/libwine/isinf.c trunk/reactos/lib/3rdparty/libwine/isnan.c
Modified: trunk/reactos/dll/directx/wine/wined3d/utils.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/ut... ============================================================================== --- trunk/reactos/dll/directx/wine/wined3d/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/wined3d/utils.c [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -25,7 +25,10 @@ */
#include "wined3d_private.h" -#include <wine/port.h> + +#ifdef _MSC_VER +#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) +#endif
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
Modified: trunk/reactos/include/reactos/wine/config.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/config... ============================================================================== --- trunk/reactos/include/reactos/wine/config.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/config.h [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -295,6 +295,9 @@
/* Define to 1 if you have the <io.h> header file. */ #define HAVE_IO_H 1 + +/* Define to 1 if you have the `isfinite' function. */ +/* #undef HAVE_ISFINITE */
/* Define to 1 if you have the `isinf' function. */ /* #undef HAVE_ISINF */
Modified: trunk/reactos/include/reactos/wine/port.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.h... ============================================================================== --- trunk/reactos/include/reactos/wine/port.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/port.h [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -15,7 +15,7 @@ * * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef __WINE_WINE_PORT_H @@ -25,7 +25,9 @@ # error You must include config.h to use this header #endif
-#define _GNU_SOURCE /* for pread/pwrite */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE /* for pread/pwrite, isfinite */ +#endif #include <fcntl.h> #include <math.h> #include <sys/types.h> @@ -246,11 +248,15 @@ size_t getpagesize(void); #endif /* HAVE_GETPAGESIZE */
-#if !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf) +#if !defined(HAVE_ISFINITE) && !defined(isfinite) +int isfinite(double x); +#endif + +#if !defined(HAVE_ISINF) && !defined(isinf) int isinf(double x); #endif
-#if !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan) +#if !defined(HAVE_ISNAN) && !defined(isnan) int isnan(double x); #endif
Modified: trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/CMakeL... ============================================================================== --- trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwine/CMakeLists.txt [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -6,6 +6,7 @@ config.c debug_ros.c isinf.c + isfinite.c isnan.c loader.c ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/wctype.c
Added: trunk/reactos/lib/3rdparty/libwine/isfinite.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/isfini... ============================================================================== --- trunk/reactos/lib/3rdparty/libwine/isfinite.c (added) +++ trunk/reactos/lib/3rdparty/libwine/isfinite.c [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -0,0 +1,46 @@ +/* + * isfinite function + * + * Copyright 2013 Francois Gouget + * + * 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_ISFINITE) && !defined(isfinite) + +#ifdef HAVE_IEEEFP_H +#include <ieeefp.h> + +int isfinite(double x) +{ + return finite(x); +} + +#elif defined(HAVE_FLOAT_H) && defined(HAVE__FINITE) +#include <float.h> + +int isfinite(double x) +{ + return _finite(x); +} + +#else +#error No isfinite() implementation available. +#endif + +#endif /* !defined(HAVE_ISFINITE) && !defined(isfinite) */
Propchange: trunk/reactos/lib/3rdparty/libwine/isfinite.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwine/isinf.c [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -21,7 +21,7 @@ #include "config.h" #include "wine/port.h"
-#if !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf) +#if !defined(HAVE_ISINF) && !defined(isinf)
#ifdef HAVE_IEEEFP_H #include <ieeefp.h> @@ -43,4 +43,4 @@ #error No isinf() implementation available. #endif
-#endif /* !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf) */ +#endif /* !defined(HAVE_ISINF) && !defined(isinf) */
Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwine/isnan.c [iso-8859-1] Sun Jan 26 21:55:59 2014 @@ -21,7 +21,7 @@ #include "config.h" #include "wine/port.h"
-#if !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan) +#if !defined(HAVE_ISNAN) && !defined(isnan)
#ifdef HAVE_IEEEFP_H #include <ieeefp.h> @@ -43,4 +43,4 @@ #error No isnan() implementation available. #endif
-#endif /* !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan) */ +#endif /* !defined(HAVE_ISNAN) && !defined(isnan) */