mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[LIBWINE][WINED3D]
- Import isfinite from Wine libport & hack-define copysignf -- aka fix build svn path=/trunk/; revision=61847
This commit is contained in:
parent
5f866a6e2e
commit
c224fd594b
7 changed files with 68 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
1
reactos/lib/3rdparty/libwine/CMakeLists.txt
vendored
1
reactos/lib/3rdparty/libwine/CMakeLists.txt
vendored
|
@ -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
46
reactos/lib/3rdparty/libwine/isfinite.c
vendored
Normal 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) */
|
4
reactos/lib/3rdparty/libwine/isinf.c
vendored
4
reactos/lib/3rdparty/libwine/isinf.c
vendored
|
@ -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) */
|
||||
|
|
4
reactos/lib/3rdparty/libwine/isnan.c
vendored
4
reactos/lib/3rdparty/libwine/isnan.c
vendored
|
@ -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) */
|
||||
|
|
Loading…
Reference in a new issue