Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
0ac4b0f9
Commit
0ac4b0f9
authored
13 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Check for lround with autoconf; fall back to rint.
parent
03760f6c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.in
+1
-1
1 addition, 1 deletion
configure.in
src/common/util.c
+5
-3
5 additions, 3 deletions
src/common/util.c
with
6 additions
and
4 deletions
configure.in
+
1
−
1
View file @
0ac4b0f9
...
...
@@ -223,7 +223,7 @@ dnl -------------------------------------------------------------------
dnl Check for functions before libevent, since libevent-1.2 apparently
dnl exports strlcpy without defining it in a header.
AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl vasprintf)
AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl vasprintf
lround rint
)
using_custom_malloc=no
if test x$enable_openbsd_malloc = xyes ; then
...
...
This diff is collapsed.
Click to expand it.
src/common/util.c
+
5
−
3
View file @
0ac4b0f9
...
...
@@ -334,10 +334,12 @@ tor_mathlog(double d)
long
tor_lround
(
double
d
)
{
#ifdef _MSC_VER
return
(
long
)(
d
>
0
?
d
+
0
.
5
:
ceil
(
d
-
0
.
5
));
#else
#if defined(HAVE_LROUND)
return
lround
(
d
);
#elif defined(HAVE_RINT)
return
(
long
)
rint
(
d
);
#else
return
(
long
)(
d
>
0
?
d
+
0
.
5
:
ceil
(
d
-
0
.
5
));
#endif
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment