List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:June 23 2009 11:11am
Subject:bzr commit into mysql-5.4 branch (mats:2797) WL#5016
View as plain text  
#At file:///home/bzr/mkindahl/w4877-azalea/ based on revid:mats@stripped

 2797 Mats Kindahl	2009-06-23
      WL#5016: Fix header file include guards
      
      Making header files in include/ self-sufficient, except the following:
      
      include/atomic/generic-msvc.h     # MSCV-specific
      include/m_string.h                # Used by libmysql
      include/my_alloc.h                # Part of ABI
      include/mysql/service_thd_alloc.h # Part of ABI
      include/mysql/services.h          # Part of ABI
      include/mysql_com.h		  # Part of ABI
      include/mysql_time.h              # Part of ABI
      include/mysqld_ername.h           # Generated file
      include/mysqld_error.h            # Generated file
      include/sql_state.h               # Generated file
      include/typelib.h                 # Part of ABI
      include/maria.h                   # Dependent on storage engine headers (!)
      include/config-netware.h          # Netware-specific
      include/config-win.h              # Windows-specific

    modified:
      include/atomic/rwlock.h
      include/base64.h
      include/decimal.h
      include/ft_global.h
      include/hash.h
      include/keycache.h
      include/m_ctype.h
      include/m_string.h
      include/my_aes.h
      include/my_alarm.h
      include/my_atomic.h
      include/my_bit.h
      include/my_bitmap.h
      include/my_dbug.h
      include/my_dir.h
      include/my_getopt.h
      include/my_handler.h
      include/my_md5.h
      include/my_net.h
      include/my_nosys.h
      include/my_pthread.h
      include/my_sys.h
      include/my_trie.h
      include/my_uctype.h
      include/my_xml.h
      include/myisamchk.h
      include/mysys_err.h
      include/queues.h
      include/rijndael.h
      include/sha1.h
      include/sql_common.h
      include/t_ctype.h
      include/thr_alarm.h
      include/violite.h
=== modified file 'include/atomic/rwlock.h'
--- a/include/atomic/rwlock.h	2009-06-22 09:36:50 +0000
+++ b/include/atomic/rwlock.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include "my_pthread.h"
+
 typedef struct {pthread_mutex_t rw;} my_atomic_rwlock_t;
 #define MY_ATOMIC_MODE_RWLOCKS 1
 

=== modified file 'include/base64.h'
--- a/include/base64.h	2009-03-25 00:04:41 +0000
+++ b/include/base64.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,8 @@
 #ifndef __BASE64_H_INCLUDED__
 #define __BASE64_H_INCLUDED__
 
+#include "my_global.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif

=== modified file 'include/decimal.h'
--- a/include/decimal.h	2007-05-24 10:24:36 +0000
+++ b/include/decimal.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,8 @@
 #ifndef _decimal_h
 #define _decimal_h
 
+#include "my_global.h"
+
 typedef enum
 {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
   decimal_round_mode;

=== modified file 'include/ft_global.h'
--- a/include/ft_global.h	2007-06-27 14:49:12 +0000
+++ b/include/ft_global.h	2009-06-23 11:11:01 +0000
@@ -21,6 +21,11 @@
 
 #ifndef _ft_global_h
 #define _ft_global_h
+
+#include "my_global.h"
+#include "m_ctype.h"                           /* Pull in CHARSET_INFO */
+#include "my_handler.h"                        /* Pull in HA_KEYSEG */
+
 #ifdef  __cplusplus
 extern "C" {
 #endif

=== modified file 'include/hash.h'
--- a/include/hash.h	2009-02-13 16:30:54 +0000
+++ b/include/hash.h	2009-06-23 11:11:01 +0000
@@ -17,6 +17,10 @@
 
 #ifndef _hash_h
 #define _hash_h
+
+#include "my_global.h"
+#include "my_sys.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/keycache.h'
--- a/include/keycache.h	2008-07-09 07:12:43 +0000
+++ b/include/keycache.h	2009-06-23 11:11:01 +0000
@@ -20,6 +20,10 @@
 
 #ifndef _keycache_h
 #define _keycache_h
+
+#include "my_global.h"
+#include "my_sys.h"
+
 C_MODE_START
 
 /* declare structures that is used by st_key_cache */

=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h	2009-03-28 00:27:25 +0000
+++ b/include/m_ctype.h	2009-06-23 11:11:01 +0000
@@ -21,6 +21,8 @@
 #ifndef _m_ctype_h
 #define _m_ctype_h
 
+#include "my_global.h"                    /* Pull in uint16, et.al. */
+
 #include <my_attribute.h>
 
 #ifdef	__cplusplus

=== modified file 'include/m_string.h'
--- a/include/m_string.h	2009-05-04 17:14:38 +0000
+++ b/include/m_string.h	2009-06-23 11:11:01 +0000
@@ -20,6 +20,7 @@
 
 #ifndef _m_string_h
 #define _m_string_h
+
 #ifndef __USE_GNU
 #define __USE_GNU				/* We want to use stpcpy */
 #endif

=== modified file 'include/my_aes.h'
--- a/include/my_aes.h	2009-06-22 09:36:50 +0000
+++ b/include/my_aes.h	2009-06-23 11:11:01 +0000
@@ -20,6 +20,8 @@
 /* Header file for my_aes.c */
 /* Wrapper to give simple interface for MySQL to AES standard encryption */
 
+#include "my_global.h"
+
 #include "rijndael.h"
 
 C_MODE_START

=== modified file 'include/my_alarm.h'
--- a/include/my_alarm.h	2008-04-09 00:56:49 +0000
+++ b/include/my_alarm.h	2009-06-23 11:11:01 +0000
@@ -23,6 +23,8 @@
 extern "C" {
 #endif
 
+#include "my_global.h"
+
 extern int volatile my_have_got_alarm;
 extern ulong my_time_to_wait_for_lock;
 

=== modified file 'include/my_atomic.h'
--- a/include/my_atomic.h	2009-06-22 09:36:50 +0000
+++ b/include/my_atomic.h	2009-06-23 11:11:01 +0000
@@ -52,6 +52,8 @@
   but can be added, if necessary. 
 */
 
+#include "my_global.h"
+
 #ifndef my_atomic_rwlock_init
 
 #define intptr         void *

=== modified file 'include/my_bit.h'
--- a/include/my_bit.h	2009-06-22 09:36:50 +0000
+++ b/include/my_bit.h	2009-06-23 11:11:01 +0000
@@ -1,6 +1,8 @@
 #ifndef MY_BIT_INCLUDED
 #define MY_BIT_INCLUDED
 
+#include "my_global.h"
+
 /*
   Some useful bit functions
 */

=== modified file 'include/my_bitmap.h'
--- a/include/my_bitmap.h	2009-05-14 21:49:53 +0000
+++ b/include/my_bitmap.h	2009-06-23 11:11:01 +0000
@@ -18,6 +18,9 @@
 
 #define MY_BIT_NONE (~(uint) 0)
 
+#include "my_global.h"
+#include "my_config.h"
+
 #include <m_string.h>
 
 typedef uint32 my_bitmap_map;

=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h	2008-12-10 17:04:38 +0000
+++ b/include/my_dbug.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,8 @@
 #ifndef _dbug_h
 #define _dbug_h
 
+#include "my_global.h"
+
 #ifdef  __cplusplus
 extern "C" {
 #endif

=== modified file 'include/my_dir.h'
--- a/include/my_dir.h	2009-05-22 21:10:24 +0000
+++ b/include/my_dir.h	2009-06-23 11:11:01 +0000
@@ -15,6 +15,9 @@
 
 #ifndef _my_dir_h
 #define _my_dir_h
+
+#include "my_global.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/my_getopt.h'
--- a/include/my_getopt.h	2008-10-27 09:57:59 +0000
+++ b/include/my_getopt.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,9 @@
 #ifndef _my_getopt_h
 #define _my_getopt_h
 
+#include "my_global.h"
+#include "my_sys.h"
+
 C_MODE_START
 
 #define GET_NO_ARG     1

=== modified file 'include/my_handler.h'
--- a/include/my_handler.h	2008-11-12 15:23:22 +0000
+++ b/include/my_handler.h	2009-06-23 11:11:01 +0000
@@ -20,6 +20,22 @@
 
 #include "myisampack.h"
 
+#include "my_global.h"
+
+/*
+  It is necessary to pull in this header file since it uses a typedef
+  to introduce the CHARSET_INFO type name. If a forward declaration of
+  the form below is used, it will cause a compile error since the same
+  typedef is used at multiple places, and this is not legal C.
+
+     typedef struct charset_info_st CHARSET_INFO;
+
+  The solution would be to never use typedefs to introduce aliases to
+  class names and always use "class" declarations for classes and
+  "struct" for PODs.
+ */
+#include "m_ctype.h"                        /* Pull in CHARSET_INFO */
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/my_md5.h'
--- a/include/my_md5.h	2009-06-22 09:36:50 +0000
+++ b/include/my_md5.h	2009-06-23 11:11:01 +0000
@@ -18,6 +18,8 @@
 
 /* See md5.c for explanation and copyright information.  */
 
+#include "my_global.h"
+
 /*
  * $FreeBSD: src/contrib/cvs/lib/md5.h,v 1.2 1999/12/11 15:10:02 peter Exp $
  */

=== modified file 'include/my_net.h'
--- a/include/my_net.h	2008-02-14 20:53:25 +0000
+++ b/include/my_net.h	2009-06-23 11:11:01 +0000
@@ -24,6 +24,9 @@
 
 #ifndef _my_net_h
 #define _my_net_h
+
+#include "my_global.h"
+
 C_MODE_START
 
 #include <errno.h>

=== modified file 'include/my_nosys.h'
--- a/include/my_nosys.h	2007-05-10 09:59:39 +0000
+++ b/include/my_nosys.h	2009-06-23 11:11:01 +0000
@@ -19,6 +19,9 @@
 */
 #ifndef _my_nosys_h
 #define _my_nosys_h
+
+#include "my_global.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2009-05-14 21:49:53 +0000
+++ b/include/my_pthread.h	2009-06-23 11:11:01 +0000
@@ -18,6 +18,8 @@
 #ifndef _my_pthread_h
 #define _my_pthread_h
 
+#include "my_global.h"
+
 #ifndef ETIME
 #define ETIME ETIMEDOUT				/* For FreeBSD */
 #endif

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2009-05-25 07:11:29 +0000
+++ b/include/my_sys.h	2009-06-23 11:11:01 +0000
@@ -20,6 +20,9 @@
 
 #ifndef _my_sys_h
 #define _my_sys_h
+
+#include "my_global.h"                          /* Pull in NEAR */
+
 C_MODE_START
 
 #ifdef HAVE_AIOWAIT

=== modified file 'include/my_trie.h'
--- a/include/my_trie.h	2007-05-10 09:59:39 +0000
+++ b/include/my_trie.h	2009-06-23 11:11:01 +0000
@@ -15,6 +15,11 @@
 
 #ifndef _trie_h
 #define _trie_h
+
+#include "my_global.h"
+#include "my_alloc.h"
+#include "m_ctype.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/my_uctype.h'
--- a/include/my_uctype.h	2009-06-22 09:36:50 +0000
+++ b/include/my_uctype.h	2009-06-23 11:11:01 +0000
@@ -16,6 +16,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
+#include "m_ctype.h"
+
 /*
   Unicode ctype data
   Generated from UnicodeData-5.0.0d9.txt

=== modified file 'include/my_xml.h'
--- a/include/my_xml.h	2007-05-10 09:59:39 +0000
+++ b/include/my_xml.h	2009-06-23 11:11:01 +0000
@@ -17,6 +17,8 @@
 #ifndef _my_xml_h
 #define _my_xml_h
 
+#include "my_global.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/myisamchk.h'
--- a/include/myisamchk.h	2009-04-23 21:17:43 +0000
+++ b/include/myisamchk.h	2009-06-23 11:11:01 +0000
@@ -26,6 +26,13 @@
 #ifndef _myisamchk_h
 #define _myisamchk_h
 
+#include "my_global.h"
+#include "my_handler.h"           /* Pull in HA_MAX_POSSIBLE_KEY_BUFF,
+                                     HA_MAX_KEY_SEG, HA_MAX_POSSIBLE_KEY,
+                                     HA_MAX_KEY_BUFF */
+#include "my_sys.h"               /* Pull in  MY_TMPDIR */
+#include "my_base.h"              /* Pull in ha_rows */
+
 #define T_AUTO_INC              1
 #define T_AUTO_REPAIR           2		/* QQ to be removed */
 #define T_BACKUP_DATA           4

=== modified file 'include/mysys_err.h'
--- a/include/mysys_err.h	2008-01-03 07:45:46 +0000
+++ b/include/mysys_err.h	2009-06-23 11:11:01 +0000
@@ -15,6 +15,9 @@
 
 #ifndef _mysys_err_h
 #define _mysys_err_h
+
+#include "my_global.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/queues.h'
--- a/include/queues.h	2007-11-14 18:20:31 +0000
+++ b/include/queues.h	2009-06-23 11:11:01 +0000
@@ -22,6 +22,9 @@
 
 #ifndef _queues_h
 #define _queues_h
+
+#include "my_global.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/rijndael.h'
--- a/include/rijndael.h	2009-06-22 09:36:50 +0000
+++ b/include/rijndael.h	2009-06-23 11:11:01 +0000
@@ -30,6 +30,8 @@
   Modified by Peter Zaitsev to fit MySQL coding style.
  */
 
+#include "my_global.h"
+
 #define AES_MAXKC	(256/32)
 #define AES_MAXKB	(256/8)
 #define AES_MAXNR	14

=== modified file 'include/sha1.h'
--- a/include/sha1.h	2009-06-22 09:36:50 +0000
+++ b/include/sha1.h	2009-06-23 11:11:01 +0000
@@ -31,6 +31,8 @@
 */
 
 
+#include "my_global.h"
+
 enum sha_result_codes
 {
   SHA_SUCCESS = 0,

=== modified file 'include/sql_common.h'
--- a/include/sql_common.h	2009-06-22 09:36:50 +0000
+++ b/include/sql_common.h	2009-06-23 11:11:01 +0000
@@ -17,6 +17,10 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 
+#include "m_ctype.h"        /* Pull in CHARSET_INFO */
+#include "my_alloc.h"       /* Pull in MEM_ROOT */
+#include "mysql.h"          /* Pull in MYSQL_FIELD MYSQL_DATA MYSQL */
+
 extern const char	*unknown_sqlstate;
 extern const char	*cant_connect_sqlstate;
 extern const char	*not_error_sqlstate;

=== modified file 'include/t_ctype.h'
--- a/include/t_ctype.h	2006-12-23 19:17:15 +0000
+++ b/include/t_ctype.h	2009-06-23 11:11:01 +0000
@@ -29,6 +29,8 @@
 #ifndef _t_ctype_h
 #define _t_ctype_h
 
+#include "my_global.h"
+
 #define TOT_LEVELS 5
 #define LAST_LEVEL 4  /* TOT_LEVELS - 1 */
 

=== modified file 'include/thr_alarm.h'
--- a/include/thr_alarm.h	2008-04-28 16:24:05 +0000
+++ b/include/thr_alarm.h	2009-06-23 11:11:01 +0000
@@ -17,6 +17,10 @@
 
 #ifndef _thr_alarm_h
 #define _thr_alarm_h
+
+#include "my_global.h"
+#include "my_pthread.h"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif

=== modified file 'include/violite.h'
--- a/include/violite.h	2008-04-23 12:33:25 +0000
+++ b/include/violite.h	2009-06-23 11:11:01 +0000
@@ -23,6 +23,7 @@
 
 #include "my_net.h"			/* needed because of struct in_addr */
 
+#include "mysql_com.h"                          /* Pull in Vio */
 
 /* Simple vio interface in C;  The functions are implemented in violite.c */
 


Attachment: [text/bzr-bundle] bzr/mats@sun.com-20090623111101-ckdz1r73sxgocwjt.bundle
Thread
bzr commit into mysql-5.4 branch (mats:2797) WL#5016Mats Kindahl23 Jun
  • Re: bzr commit into mysql-5.4 branch (mats:2797) WL#5016Konstantin Osipov27 Jun
    • Re: bzr commit into mysql-5.4 branch (mats:2797) WL#5016Mats Kindahl28 Jun