From 3b405715b93704fe60627b22e4dfdae6a3727158 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 2 Mar 2017 00:45:21 +0800 Subject: Visual Studio builds: Drop the compatibility math.h This has been superseded by fallback-c89.c, which builds the fallback implementation based on the availability of round() and lrintf(), which is also pre-set in the pre-configured config.h.win32.in. --- win32/vs10/Makefile.am | 8 ++----- win32/vs11/Makefile.am | 6 +----- win32/vs9/Makefile.am | 3 +-- win32/vs9/math.h | 58 -------------------------------------------------- 4 files changed, 4 insertions(+), 71 deletions(-) delete mode 100644 win32/vs9/math.h diff --git a/win32/vs10/Makefile.am b/win32/vs10/Makefile.am index 84f29a63c..ea7c92f5e 100644 --- a/win32/vs10/Makefile.am +++ b/win32/vs10/Makefile.am @@ -20,8 +20,7 @@ EXTRA_DIST = \ gdk-pixbuf-pixdata.vcxproj.filters \ gdk-pixbuf-install.vcxproj \ gdk-pixbuf-install.vcxproj.filters \ - $(GENERATED_ITEMS) \ - math.h + $(GENERATED_ITEMS) gdk-pixbuf-install.props: $(top_srcdir)/win32/vs10/gdk-pixbuf-install.propsin gdk-pixbuf.vs10.headers -$(RM) $(top_builddir)/win32/vs11/gdk-pixbuf-install.props @@ -31,9 +30,6 @@ gdk-pixbuf-install.props: $(top_srcdir)/win32/vs10/gdk-pixbuf-install.propsin gd $(CPP) -P - <$(top_srcdir)/win32/vs10/gdk-pixbuf-install.propsin >$@ rm gdk-pixbuf.vs10.headers -math.h: $(top_srcdir)/win32/vs9/math.h - cp $< $@ - -DISTCLEANFILES = $(GENERATED_ITEMS) math.h +DISTCLEANFILES = $(GENERATED_ITEMS) -include $(top_srcdir)/git.mk diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am index 153ca9238..08743e013 100644 --- a/win32/vs11/Makefile.am +++ b/win32/vs11/Makefile.am @@ -14,8 +14,7 @@ EXTRA_DIST = \ gdk-pixbuf-pixdata.vcxproj \ gdk-pixbuf-pixdata.vcxproj.filters \ gdk-pixbuf-install.vcxproj \ - gdk-pixbuf-install.vcxproj.filters \ - math.h + gdk-pixbuf-install.vcxproj.filters DISTCLEANFILES = $(EXTRA_DIST) @@ -26,7 +25,4 @@ MSVC_VER_LONG = 2012 include $(top_srcdir)/win32/Makefile-newvs.am -math.h: $(top_srcdir)/win32/vs9/math.h - cp $< $@ - -include $(top_srcdir)/git.mk diff --git a/win32/vs9/Makefile.am b/win32/vs9/Makefile.am index 9e4204200..66016c638 100644 --- a/win32/vs9/Makefile.am +++ b/win32/vs9/Makefile.am @@ -14,8 +14,7 @@ EXTRA_DIST = \ gdk-pixbuf-query-loaders.vcproj \ gdk-pixbuf-pixdata.vcproj \ gdk-pixbuf-install.vcproj \ - $(GENERATED_ITEMS) \ - math.h + $(GENERATED_ITEMS) gdk-pixbuf-install.vsprops: $(top_srcdir)/win32/vs9/gdk-pixbuf-install.vspropsin gdk-pixbuf.headers $(CPP) -P - <$(top_srcdir)/win32/vs9/gdk-pixbuf-install.vspropsin >$@ diff --git a/win32/vs9/math.h b/win32/vs9/math.h deleted file mode 100644 index a442179d2..000000000 --- a/win32/vs9/math.h +++ /dev/null @@ -1,58 +0,0 @@ -/* GdkPixbuf library - Compatibility Math Header for - * pre-Visual Studio 2013 Headers - * to Build GDK-Pixbuf - * - * Copyright (C) 2014 Chun-wei Fan - * - * Authors: Chun-wei Fan - * - * 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 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, see . - */ - -#ifndef _MSC_VER -#error "This Header is intended for Visual Studio Builds only" -#endif - -/* Include the stock Visual Studio math.h first */ -#include <../include/math.h> - -/* Visual Studio 2013 and later do not need this compatibility item */ -#if (_MSC_VER < 1800) - -#ifndef __MSVC_MATH_COMPAT_H__ -#define __MSVC_MATH_COMPAT_H__ - -/* Note: This is a rather generic fallback implementation for round(), which is - * okay for the purposes for GTK+, but please note the following if intending - * use this implementation: - * - * -The largest floating point value strictly less than 0.5. The problem is - * that the addition produces 1 due to rounding. - * - * -A set of large integers near 2^52 for which adding 0.5 is the same as - * adding 1, again due to rounding. - */ - -static __inline double -round (double x) -{ - if (x >= 0) - return floor (x + 0.5); - else - return ceil (x - 0.5); -} - -#endif /* __MSVC_MATH_COMPAT_H__ */ - -#endif /* _MSC_VER < 1800 */ \ No newline at end of file -- cgit v1.2.1