[LIBWINE][WINED3D]

- Import isfinite from Wine libport & hack-define copysignf -- aka fix build

svn path=/trunk/; revision=61847
This commit is contained in:
Thomas Faber 2014-01-26 21:55:59 +00:00
parent 5f866a6e2e
commit c224fd594b
7 changed files with 68 additions and 9 deletions

View file

@ -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);

View file

@ -296,6 +296,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 */

View file

@ -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 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
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

View file

@ -6,6 +6,7 @@ list(APPEND SOURCE
config.c
debug_ros.c
isinf.c
isfinite.c
isnan.c
loader.c
${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/wctype.c

46
reactos/lib/3rdparty/libwine/isfinite.c vendored Normal file
View file

@ -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) */

View file

@ -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 @@ int isinf(double x)
#error No isinf() implementation available.
#endif
#endif /* !defined(HAVE_ISINF) && !defined(_ISINF) && !defined(isinf) */
#endif /* !defined(HAVE_ISINF) && !defined(isinf) */

View file

@ -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 @@ int isnan(double x)
#error No isnan() implementation available.
#endif
#endif /* !defined(HAVE_ISNAN) && !defined(_ISNAN) && !defined(isnan) */
#endif /* !defined(HAVE_ISNAN) && !defined(isnan) */