Commit 49cf54d1 authored by unknown's avatar unknown
Browse files

Bug#15936 "round" differs on Windows to Unix

 - remove the windows specific implementation  of 'rint' and use the default from my_global.h


include/config-win.h:
  Remove the windows specific version of 'rint' since there already is another default implementation in my_global.h
parent d4f7518e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ functions */

#include <sys/locking.h>
#include <windows.h>
#include <math.h>			/* Because of rint() */
#include <fcntl.h>
#include <io.h>
#include <malloc.h>
@@ -222,17 +221,9 @@ typedef uint rf_SetTimer;
#define inline __inline
#endif /* __cplusplus */

inline double rint(double nr)
{
  double f = floor(nr);
  double c = ceil(nr);
  return (((c-nr) >= (nr-f)) ? f :c);
}

#ifdef _WIN64
#define ulonglong2double(A) ((double) (ulonglong) (A))
#define my_off_t2double(A)  ((double) (my_off_t) (A))

#else
inline double ulonglong2double(ulonglong value)
{
@@ -338,7 +329,6 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_FLOAT_H
#define HAVE_LIMITS_H
#define HAVE_STDDEF_H
#define HAVE_RINT		/* defined in this file */
#define NO_FCNTL_NONBLOCK	/* No FCNTL */
#define HAVE_ALLOCA
#define HAVE_STRPBRK