List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:March 4 2011 3:16pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4238)
View as plain text  
#At file:///home/msvensson/mysql/7.0-sizeof/ based on revid:ms136779@asator03-20110302143037-8td69rj9flr8vodh

 4238 Magnus Blåudd	2011-03-04
      ndb
       - remove NDB_SIZEOF_* defines, they are not used anywhere in the
        code, instead use the SIZEOF_* defines which are set by configure,
        hardocoded on Windows in 7.0 and by CMake in 5.5+(where they are actually
        also hardcoded on Windows - but different)
       - move include/ndb_types.h.in to include/ndb_types.h
       - don't configure ndb_types.h.in anymore!

    renamed:
      storage/ndb/include/ndb_types.h.in => storage/ndb/include/ndb_types.h
    modified:
      storage/ndb/include/CMakeLists.txt
      storage/ndb/include/ndb_global.h
      storage/ndb/ndb_configure.m4
      storage/ndb/include/ndb_types.h
=== modified file 'storage/ndb/include/CMakeLists.txt'
--- a/storage/ndb/include/CMakeLists.txt	2011-02-03 14:20:36 +0000
+++ b/storage/ndb/include/CMakeLists.txt	2011-03-04 15:16:33 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,18 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# Check the size of our types and configure ndb_types.h
-INCLUDE(CheckTypeSize)
-CHECK_TYPE_SIZE(char NDB_SIZEOF_CHAR)
-CHECK_TYPE_SIZE(short NDB_SIZEOF_SHORT)
-CHECK_TYPE_SIZE(int NDB_SIZEOF_INT)
-CHECK_TYPE_SIZE(long NDB_SIZEOF_LONG)
-CHECK_TYPE_SIZE("char*" NDB_SIZEOF_CHARP)
-CHECK_TYPE_SIZE("long long" NDB_SIZEOF_LONG_LONG)
-CONFIGURE_FILE(ndb_types.h.in
-               ${CMAKE_CURRENT_SOURCE_DIR}/ndb_types.h
-               @ONLY)
-
 #
 # Read a value for variable from ndb_configure.m4
 #

=== modified file 'storage/ndb/include/ndb_global.h'
--- a/storage/ndb/include/ndb_global.h	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/include/ndb_global.h	2011-03-04 15:16:33 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 #define NDB_GLOBAL_H
 
 #ifdef _WIN32
-/* Workaround for Bug#32082: VOID refdefinition results in compile errors */
+/* Workaround for Bug#32082: VOID redefinition results in compile errors */
 #ifndef DONT_DEFINE_VOID
 #define DONT_DEFINE_VOID
 #endif
@@ -55,18 +55,6 @@
 #define DIR_SEPARATOR "/"
 #endif
 
-#if ! (NDB_SIZEOF_CHAR == SIZEOF_CHAR)
-#error "Invalid define for Uint8"
-#endif
-
-#if ! (NDB_SIZEOF_INT == SIZEOF_INT)
-#error "Invalid define for Uint32"
-#endif
-
-#if ! (NDB_SIZEOF_LONG_LONG == SIZEOF_LONG_LONG)
-#error "Invalid define for Uint64"
-#endif
-
 #include <signal.h>
 
 #ifdef _AIX

=== renamed file 'storage/ndb/include/ndb_types.h.in' => 'storage/ndb/include/ndb_types.h'
--- a/storage/ndb/include/ndb_types.h.in	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/include/ndb_types.h	2011-03-04 15:16:33 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,19 +15,10 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-/**
- * @file ndb_types.h
- */
-
 #ifndef NDB_TYPES_H
 #define NDB_TYPES_H
 
-#define NDB_SIZEOF_CHARP @NDB_SIZEOF_CHARP@
-#define NDB_SIZEOF_CHAR @NDB_SIZEOF_CHAR@
-#define NDB_SIZEOF_INT @NDB_SIZEOF_INT@
-#define NDB_SIZEOF_SHORT @NDB_SIZEOF_SHORT@
-#define NDB_SIZEOF_LONG @NDB_SIZEOF_LONG@
-#define NDB_SIZEOF_LONG_LONG @NDB_SIZEOF_LONG_LONG@
+#include <ndb_global.h>
 
 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
 typedef unsigned __int64 Uint64;
@@ -61,27 +52,27 @@ typedef unsigned int UintR;
 
 #ifdef __SIZE_TYPE__
   typedef __SIZE_TYPE__ UintPtr;
-#elif NDB_SIZEOF_CHARP == 4
+#elif SIZEOF_CHARP == 4
   typedef Uint32 UintPtr;
-#elif NDB_SIZEOF_CHARP == 8
+#elif SIZEOF_CHARP == 8
   typedef Uint64 UintPtr;
 #else
   #error "Unknown size of (char *)"
 #endif
 
-#if ! (NDB_SIZEOF_CHAR == 1)
+#if ! (SIZEOF_CHAR == 1)
 #error "Invalid define for Uint8"
 #endif
 
-#if ! (NDB_SIZEOF_SHORT == 2)
+#if ! (SIZEOF_SHORT == 2)
 #error "Invalid define for Uint16"
 #endif
 
-#if ! (NDB_SIZEOF_INT == 4)
+#if ! (SIZEOF_INT == 4)
 #error "Invalid define for Uint32"
 #endif
 
-#if ! (NDB_SIZEOF_LONG_LONG == 8)
+#if ! (SIZEOF_LONG_LONG == 8)
 #error "Invalid define for Uint64"
 #endif
 

=== modified file 'storage/ndb/ndb_configure.m4'
--- a/storage/ndb/ndb_configure.m4	2011-02-23 13:16:59 +0000
+++ b/storage/ndb/ndb_configure.m4	2011-03-04 15:16:33 +0000
@@ -605,20 +605,5 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   AC_SUBST(NDB_DEFS)
   AC_SUBST(ndb_cxxflags_fix)
 
-  NDB_SIZEOF_CHARP="$ac_cv_sizeof_charp"
-  NDB_SIZEOF_CHAR="$ac_cv_sizeof_char"
-  NDB_SIZEOF_SHORT="$ac_cv_sizeof_short"
-  NDB_SIZEOF_INT="$ac_cv_sizeof_int"
-  NDB_SIZEOF_LONG="$ac_cv_sizeof_long"
-  NDB_SIZEOF_LONG_LONG="$ac_cv_sizeof_long_long"
-  AC_SUBST([NDB_SIZEOF_CHARP])
-  AC_SUBST([NDB_SIZEOF_CHAR])
-  AC_SUBST([NDB_SIZEOF_SHORT])
-  AC_SUBST([NDB_SIZEOF_INT])
-  AC_SUBST([NDB_SIZEOF_LONG])
-  AC_SUBST([NDB_SIZEOF_LONG_LONG])
-
-  AC_CONFIG_FILES([storage/ndb/include/ndb_types.h])
-
 ])
 

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110304151633-x1a8bei1h1fenp89.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4238) Magnus Blåudd4 Mar