Another attempt to fix building using MINGW. Affects #55
This commit is contained in:
parent
c7ca786e77
commit
b757b4c590
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include_next <math.h>
|
#include_next <math.h>
|
||||||
|
#ifndef __MINGW32__
|
||||||
/* "Old" (Pre-2015) Windows headers/libc don't have round. */
|
/* "Old" (Pre-2015) Windows headers/libc don't have round. */
|
||||||
static inline double round(double f)
|
static inline double round(double f)
|
||||||
{
|
{
|
||||||
return f >= 0? (int)(f + 0.5) : (int)(f - 0.5);
|
return f >= 0? (int)(f + 0.5) : (int)(f - 0.5);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -2,6 +2,7 @@
|
|||||||
#include_next <stdio.h>
|
#include_next <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifndef __MINGW32__
|
||||||
#ifndef __LIBRETRO__
|
#ifndef __LIBRETRO__
|
||||||
static inline int vasprintf(char **str, const char *fmt, va_list args)
|
static inline int vasprintf(char **str, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
@ -16,6 +17,7 @@ static inline int vasprintf(char **str, const char *fmt, va_list args)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This code is public domain -- Will Hartung 4/9/09 */
|
/* This code is public domain -- Will Hartung 4/9/09 */
|
||||||
static inline size_t getline(char **lineptr, size_t *n, FILE *stream) {
|
static inline size_t getline(char **lineptr, size_t *n, FILE *stream) {
|
||||||
|
Loading…
Reference in New Issue
Block a user