From d4f7518e3d4fe06fd3035fe5b5ec8a1904d2442e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Apr 2006 20:12:57 +0200 Subject: [PATCH 1/2] Remove unused defined USES_TYPES --- include/my_base.h | 1 - mysys/my_append.c | 1 - mysys/my_clock.c | 1 - mysys/my_copy.c | 1 - mysys/my_create.c | 1 - mysys/my_dup.c | 1 - mysys/my_lib.c | 1 - mysys/my_open.c | 1 - mysys/my_redel.c | 1 - mysys/my_rename.c | 1 - mysys/test_dir.c | 1 - sql/unireg.cc | 1 - 12 files changed, 12 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index b9a806cc02f..e2f25e96b93 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -21,7 +21,6 @@ #define _my_base_h #ifndef stdin /* Included first in handler */ -#define USES_TYPES /* my_dir with sys/types is included */ #define CHSIZE_USED #include #include /* This includes types */ diff --git a/mysys/my_append.c b/mysys/my_append.c index c3549c670c3..6d52c03c6cc 100644 --- a/mysys/my_append.c +++ b/mysys/my_append.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES /* sys/types is included */ #include "mysys_priv.h" #include #include diff --git a/mysys/my_clock.c b/mysys/my_clock.c index a192bde056d..7177872442f 100644 --- a/mysys/my_clock.c +++ b/mysys/my_clock.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES #include "my_global.h" #if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(OS2) && !defined(__NETWARE__) diff --git a/mysys/my_copy.c b/mysys/my_copy.c index 2fb022a25f2..d72872ce0be 100644 --- a/mysys/my_copy.c +++ b/mysys/my_copy.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES /* sys/types is included */ #include "mysys_priv.h" #include /* for stat */ #include diff --git a/mysys/my_create.c b/mysys/my_create.c index a85417c7701..25e3dfa4e8e 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES #include "mysys_priv.h" #include #include "mysys_err.h" diff --git a/mysys/my_dup.c b/mysys/my_dup.c index 4b7434e29ea..68ce0187b40 100644 --- a/mysys/my_dup.c +++ b/mysys/my_dup.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES #include "mysys_priv.h" #include "mysys_err.h" #include diff --git a/mysys/my_lib.c b/mysys/my_lib.c index 522fa56cbf1..ac9c6c4f1b4 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -17,7 +17,6 @@ /* TODO: check for overun of memory for names. */ /* Convert MSDOS-TIME to standar time_t */ -#define USES_TYPES /* sys/types is included */ #include "mysys_priv.h" #include #include /* Structs used by my_dir,includes sys/types */ diff --git a/mysys/my_open.c b/mysys/my_open.c index 6ed3cb5becf..b7798d86508 100644 --- a/mysys/my_open.c +++ b/mysys/my_open.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES #include "mysys_priv.h" #include "mysys_err.h" #include diff --git a/mysys/my_redel.c b/mysys/my_redel.c index 9af360424b0..10a0553cb19 100644 --- a/mysys/my_redel.c +++ b/mysys/my_redel.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES /* sys/types is included */ #include "mysys_priv.h" #include #include diff --git a/mysys/my_rename.c b/mysys/my_rename.c index b5d813ad787..9c27238cc72 100644 --- a/mysys/my_rename.c +++ b/mysys/my_rename.c @@ -14,7 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define USES_TYPES #include "mysys_priv.h" #include #include "mysys_err.h" diff --git a/mysys/test_dir.c b/mysys/test_dir.c index f3d220e942f..c9693ab3c68 100644 --- a/mysys/test_dir.c +++ b/mysys/test_dir.c @@ -16,7 +16,6 @@ /* TODO: Test all functions */ -#define USES_TYPES #include "mysys_priv.h" #include "my_dir.h" diff --git a/sql/unireg.cc b/sql/unireg.cc index 7cb79e866f9..658fc020870 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -24,7 +24,6 @@ str is a (long) to record position where 0 is the first position. */ -#define USES_TYPES #include "mysql_priv.h" #include #include From 49cf54d1c99db5d3cfa65452c6b4bbb9aed87fc6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Apr 2006 20:18:54 +0200 Subject: [PATCH 2/2] 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 --- include/config-win.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/config-win.h b/include/config-win.h index 14afa38c8a7..9e47b3de510 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -29,7 +29,6 @@ functions */ #include #include -#include /* Because of rint() */ #include #include #include @@ -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