Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,146
Issues
1,146
List
Boards
Labels
Service Desk
Milestones
Merge Requests
144
Merge Requests
144
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gtk
Commits
138f104f
Commit
138f104f
authored
Dec 23, 2020
by
Emmanuele Bassi
👣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '324.c89' into 'gtk-3-24'
Fix gtk-3-24 builds on older C89-esque compilers See merge request
!2995
parents
de6498f1
91343251
Pipeline
#241048
passed with stages
in 18 minutes and 49 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
3 deletions
+21
-3
config.h.meson
config.h.meson
+3
-0
config.h.win32.in
config.h.win32.in
+5
-0
configure.ac
configure.ac
+1
-1
gtk/fallback-c89.c
gtk/fallback-c89.c
+8
-0
gtk/gtkscrolledwindow.c
gtk/gtkscrolledwindow.c
+3
-2
meson.build
meson.build
+1
-0
No files found.
config.h.meson
View file @
138f104f
...
...
@@ -44,6 +44,9 @@
/* Define to 1 if you have the `flockfile' function. */
#mesondefine HAVE_FLOCKFILE
/* Define to 1 if you have the `fmin' function. */
#mesondefine HAVE_FMIN
/* Define to 1 if you have the <ftw.h> header file. */
#mesondefine HAVE_FTW_H
...
...
config.h.win32.in
View file @
138f104f
...
...
@@ -52,6 +52,11 @@
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if you have the `fmin' function. */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
# define HAVE_FMIN 1
#endif
/* Define to 1 if you have the <ftw.h> header file. */
/* #undef HAVE_FTW_H */
...
...
configure.ac
View file @
138f104f
...
...
@@ -843,7 +843,7 @@ AC_TYPE_UID_T
# Check for round(), rint(), isnan() and isinf()
# Check for log2(), exp2(), nearbyint() and trunc()
AC_CHECK_LIB(m,round,,)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc
fmin
)
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
AC_MSG_CHECKING(whether to build dynamic modules)
...
...
gtk/fallback-c89.c
View file @
138f104f
...
...
@@ -126,3 +126,11 @@ isnan (double x)
return
_isnan
(
x
);
}
#endif
#ifndef HAVE_FMIN
static
inline
double
fmin
(
double
x
,
double
y
)
{
return
x
<
y
?
x
:
y
;
}
#endif
gtk/gtkscrolledwindow.c
View file @
138f104f
...
...
@@ -48,7 +48,7 @@
#include "gtkprogresstrackerprivate.h"
#include "gtksettingsprivate.h"
#include
<math.h>
#include
"fallback-c89.c"
/**
* SECTION:gtkscrolledwindow
...
...
@@ -3754,10 +3754,11 @@ kinetic_scroll_stop_notify (GtkScrolledWindow *scrolled_window)
static
void
gtk_scrolled_window_accumulate_velocity
(
GtkKineticScrolling
**
scrolling
,
double
elapsed
,
double
*
velocity
)
{
double
last_velocity
;
if
(
!*
scrolling
)
return
;
double
last_velocity
;
gtk_kinetic_scrolling_tick
(
*
scrolling
,
elapsed
,
NULL
,
&
last_velocity
);
if
(((
*
velocity
>=
0
)
==
(
last_velocity
>=
0
))
&&
(
fabs
(
*
velocity
)
>=
fabs
(
last_velocity
)
*
VELOCITY_ACCUMULATION_FLOOR
))
...
...
meson.build
View file @
138f104f
...
...
@@ -252,6 +252,7 @@ check_functions = [
'sincos',
'trunc',
'localtime_r',
'fmin',
]
foreach func : check_functions
...
...
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