Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
335b05ac
Commit
335b05ac
authored
Dec 01, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Remove the rint() function replacements.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a75411e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
91 deletions
+24
-91
unixlib.c
dlls/msvcrt/unixlib.c
+24
-0
port.h
include/wine/port.h
+0
-24
Makefile.in
libs/port/Makefile.in
+0
-1
rint.c
libs/port/rint.c
+0
-66
No files found.
dlls/msvcrt/unixlib.c
View file @
335b05ac
...
...
@@ -479,7 +479,11 @@ static float CDECL unix_lgammaf(float x)
*/
static
__int64
CDECL
unix_llrint
(
double
x
)
{
#ifdef HAVE_LLRINT
return
llrint
(
x
);
#else
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
@@ -487,7 +491,11 @@ static __int64 CDECL unix_llrint(double x)
*/
static
__int64
CDECL
unix_llrintf
(
float
x
)
{
#ifdef HAVE_LLRINTF
return
llrintf
(
x
);
#else
return
x
>=
0
?
floorf
(
x
+
0
.
5
)
:
ceilf
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
@@ -591,7 +599,11 @@ static float CDECL unix_logbf( float x )
*/
static
int
CDECL
unix_lrint
(
double
x
)
{
#ifdef HAVE_LRINT
return
lrint
(
x
);
#else
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
@@ -599,7 +611,11 @@ static int CDECL unix_lrint(double x)
*/
static
int
CDECL
unix_lrintf
(
float
x
)
{
#ifdef HAVE_LRINTF
return
lrintf
(
x
);
#else
return
x
>=
0
?
floorf
(
x
+
0
.
5
)
:
ceilf
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
@@ -757,7 +773,11 @@ static float CDECL unix_remquof(float x, float y, int *quo)
*/
static
double
CDECL
unix_rint
(
double
x
)
{
#ifdef HAVE_RINT
return
rint
(
x
);
#else
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
@@ -765,7 +785,11 @@ static double CDECL unix_rint(double x)
*/
static
float
CDECL
unix_rintf
(
float
x
)
{
#ifdef HAVE_RINTF
return
rintf
(
x
);
#else
return
x
>=
0
?
floorf
(
x
+
0
.
5
)
:
ceilf
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
...
...
include/wine/port.h
View file @
335b05ac
...
...
@@ -278,22 +278,6 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
int
ffs
(
int
x
);
#endif
#ifndef HAVE_LLRINT
__int64
llrint
(
double
x
);
#endif
#ifndef HAVE_LLRINTF
__int64
llrintf
(
float
x
);
#endif
#ifndef HAVE_LRINT
long
lrint
(
double
x
);
#endif
#ifndef HAVE_LRINTF
long
lrintf
(
float
x
);
#endif
#ifndef HAVE_LSTAT
int
lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
#endif
/* HAVE_LSTAT */
...
...
@@ -326,14 +310,6 @@ ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
int
readlink
(
const
char
*
path
,
char
*
buf
,
size_t
size
);
#endif
/* HAVE_READLINK */
#ifndef HAVE_RINT
double
rint
(
double
x
);
#endif
#ifndef HAVE_RINTF
float
rintf
(
float
x
);
#endif
#ifndef HAVE_STATVFS
int
statvfs
(
const
char
*
path
,
struct
statvfs
*
buf
);
#endif
...
...
libs/port/Makefile.in
View file @
335b05ac
...
...
@@ -13,7 +13,6 @@ C_SRCS = \
pread.c
\
pwrite.c
\
readlink.c
\
rint.c
\
spawn.c
\
statvfs.c
\
strnlen.c
\
...
...
libs/port/rint.c
deleted
100644 → 0
View file @
8a75411e
/*
* rint family
*
* Copyright 2017 Alex Henrie
*
* 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"
#include <math.h>
#ifndef HAVE_RINT
double
rint
(
double
x
)
{
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
}
#endif
#ifndef HAVE_RINTF
float
rintf
(
float
x
)
{
return
rint
(
x
);
}
#endif
#ifndef HAVE_LRINT
long
lrint
(
double
x
)
{
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
}
#endif
#ifndef HAVE_LRINTF
long
lrintf
(
float
x
)
{
return
lrint
(
x
);
}
#endif
#ifndef HAVE_LLRINT
__int64
llrint
(
double
x
)
{
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
}
#endif
#ifndef HAVE_LLRINTF
__int64
llrintf
(
float
x
)
{
return
llrint
(
x
);
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment