• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/pixman/pixman-02-check-fe-divbyzero.patch
Thomas PetazzoniThomas Petazzoni committed cb7c12f58cb23 Feb 2014
Raw file
Source viewDiff to previous
 
1
Add a check for FE_DIVBYZERO
2
​
3
Some architectures (namely Microblaze) do have fenv.h and
4
feenableexcept, but they don't have the FE_DIVBYZERO definition. This
5
patch adds a configure check for FE_DIVBYZERO, and only uses it if
6
it's available.
7
​
8
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9
​
10
Index: b/configure.ac
11
===================================================================
12
--- a/configure.ac
13
+++ b/configure.ac
14
@@ -838,6 +838,11 @@
15
    AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()])
16
 fi
17
 
18
+AC_CHECK_DECL([FE_DIVBYZERO], [], [], [[#include <fenv.h>]])
19
+if test x$ac_cv_have_decl_FE_DIVBYZERO = xyes; then
20
+   AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO])
21
+fi
22
+
23
 AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no)
24
 AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no)
25
 if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then
26
Index: b/test/utils.c
27
===================================================================
28
--- a/test/utils.c
29
+++ b/test/utils.c
30
@@ -776,9 +776,11 @@
31
 {
32
 #ifdef HAVE_FENV_H
33
 #ifdef HAVE_FEENABLEEXCEPT
34
+#ifdef HAVE_FE_DIVBYZERO
35
     feenableexcept (FE_DIVBYZERO);
36
 #endif
37
 #endif
38
+#endif
39
 }
40
 
41
 void *
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.