forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libsamplerate, sdl2-gfx] Fix build error with Visual Studio 2019 ver…
…sion 16.9 (microsoft#14348)
- Loading branch information
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/src/float_cast.h b/src/float_cast.h | ||
index 0318427..8499e69 100644 | ||
--- a/src/float_cast.h | ||
+++ b/src/float_cast.h | ||
@@ -117,6 +117,9 @@ | ||
** most likely both WIN32 and WIN64 will be defined in 64-bit case. | ||
*/ | ||
|
||
+/* MSVC pre 16.8 do not have lrintf */ | ||
+#if defined(_MSC_VER) && _MSC_VER < 1928 | ||
+ | ||
#include <math.h> | ||
|
||
/* Win64 doesn't seem to have these functions, nor inline assembly. | ||
@@ -136,12 +139,16 @@ | ||
{ | ||
return _mm_cvtss_si32(_mm_load_ss(&flt)); | ||
} | ||
+#endif | ||
|
||
#elif (defined (WIN32) || defined (_WIN32)) | ||
|
||
#undef HAVE_LRINT_REPLACEMENT | ||
#define HAVE_LRINT_REPLACEMENT 1 | ||
|
||
+/* MSVC pre 16.8 do not have lrintf */ | ||
+#if defined(_MSC_VER) && _MSC_VER < 1928 | ||
+ | ||
#include <math.h> | ||
|
||
/* | ||
@@ -172,6 +179,7 @@ | ||
|
||
return intgr ; | ||
} | ||
+#endif | ||
|
||
#elif (defined (__MWERKS__) && defined (macintosh)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "libsamplerate", | ||
"version-string": "0.1.9.0", | ||
"port-version": 2, | ||
"port-version": 3, | ||
"description": "Sample Rate Converter for audio", | ||
"homepage": "https://www.mega-nerd.com/SRC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c | ||
index d8afb10..6c88288 100644 | ||
--- a/SDL2_gfxPrimitives.c | ||
+++ b/SDL2_gfxPrimitives.c | ||
@@ -1757,7 +1757,8 @@ int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Ui | ||
/* ----- AA Ellipse */ | ||
|
||
/* Windows targets do not have lrint, so provide a local inline version */ | ||
-#if defined(_MSC_VER) | ||
+/* MSVC pre 16.8 do not have lrint */ | ||
+#if defined(_MSC_VER) && _MSC_VER < 1928 | ||
/* Detect 64bit and use intrinsic version */ | ||
#ifdef _M_X64 | ||
#include <emmintrin.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
Source: sdl2-gfx | ||
Version: 1.0.4-6 | ||
Version: 1.0.4 | ||
Port-Version: 7 | ||
Build-Depends: sdl2 | ||
Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters