Skip to content

Commit 4ad8ef0

Browse files
author
Mats Kindahl
committed
WL#5016: Fix header file include guards
Adding header include file guards to files that are missing such.
1 parent 8f35f7c commit 4ad8ef0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+377
-6
lines changed

client/my_readline.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef CLIENT_MY_READLINE_INCLUDED
2+
#define CLIENT_MY_READLINE_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -31,3 +34,5 @@ extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
3134
extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
3235
extern char *batch_readline(LINE_BUFFER *buffer, bool *truncated);
3336
extern void batch_readline_end(LINE_BUFFER *buffer);
37+
38+
#endif /* CLIENT_MY_READLINE_INCLUDED */

client/sql_string.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef CLIENT_SQL_STRING_INCLUDED
2+
#define CLIENT_SQL_STRING_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -353,3 +356,5 @@ class String
353356
return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
354357
}
355358
};
359+
360+
#endif /* CLIENT_SQL_STRING_INCLUDED */

include/atomic/gcc_builtins.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ATOMIC_GCC_BUILTINS_INCLUDED
2+
#define ATOMIC_GCC_BUILTINS_INCLUDED
3+
14
/* Copyright (C) 2008 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -31,3 +34,5 @@
3134
#define make_atomic_store_body(S) \
3235
(void) __sync_lock_test_and_set(a, v);
3336
#endif
37+
38+
#endif /* ATOMIC_GCC_BUILTINS_INCLUDED */

include/atomic/nolock.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ATOMIC_NOLOCK_INCLUDED
2+
#define ATOMIC_NOLOCK_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -42,3 +45,4 @@ typedef struct { } my_atomic_rwlock_t;
4245

4346
#endif
4447

48+
#endif /* ATOMIC_NOLOCK_INCLUDED */

include/atomic/rwlock.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ATOMIC_RWLOCK_INCLUDED
2+
#define ATOMIC_RWLOCK_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -46,3 +49,4 @@ typedef struct {pthread_rwlock_t rw;} my_atomic_rwlock_t;
4649
#define make_atomic_load_body(S) ret= *a;
4750
#define make_atomic_store_body(S) *a= v;
4851

52+
#endif /* ATOMIC_RWLOCK_INCLUDED */

include/atomic/x86-gcc.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ATOMIC_X86_GCC_INCLUDED
2+
#define ATOMIC_X86_GCC_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -56,3 +59,4 @@
5659
asm volatile ("; xchg %0, %1;" : "+m" (*a) : "r" (v))
5760
#endif
5861

62+
#endif /* ATOMIC_X86_GCC_INCLUDED */

include/config-win.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef CONFIG_WIN_INCLUDED
2+
#define CONFIG_WIN_INCLUDED
3+
14
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
25
36
This program is free software; you can redistribute it and/or modify
@@ -410,3 +413,5 @@ inline ulonglong double2ulonglong(double d)
410413

411414
#define HAVE_UCA_COLLATIONS 1
412415
#define HAVE_BOOL 1
416+
417+
#endif /* CONFIG_WIN_INCLUDED */

include/errmsg.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ERRMSG_INCLUDED
2+
#define ERRMSG_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -100,3 +103,4 @@ extern const char *client_errors[]; /* Error messages */
100103
#define CR_ERROR_LAST /*Copy last error nr:*/ 2057
101104
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
102105

106+
#endif /* ERRMSG_INCLUDED */

include/help_end.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef HELP_END_INCLUDED
2+
#define HELP_END_INCLUDED
3+
14
/* Copyright (C) 2004-2005 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -20,3 +23,4 @@
2023
#undef fputc
2124
#undef putchar
2225
#endif
26+
#endif /* HELP_END_INCLUDED */

include/help_start.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef HELP_START_INCLUDED
2+
#define HELP_START_INCLUDED
3+
14
/* Copyright (C) 2004-2005 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -22,3 +25,4 @@
2225
#define fputc(s,f) consoleprintf("%c", s)
2326
#define putchar(s) consoleprintf("%c", s)
2427
#endif
28+
#endif /* HELP_START_INCLUDED */

include/my_aes.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_AES_INCLUDED
2+
#define MY_AES_INCLUDED
3+
14
/* Copyright (C) 2002 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -63,3 +66,5 @@ int my_aes_decrypt(const char *source, int source_length, char *dest,
6366
int my_aes_get_size(int source_length);
6467

6568
C_MODE_END
69+
70+
#endif /* MY_AES_INCLUDED */

include/my_atomic.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_ATOMIC_INCLUDED
2+
#define MY_ATOMIC_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -140,3 +143,4 @@ extern int my_atomic_initialize();
140143

141144
#endif
142145

146+
#endif /* MY_ATOMIC_INCLUDED */

include/my_bit.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_BIT_INCLUDED
2+
#define MY_BIT_INCLUDED
3+
14
/*
25
Some useful bit functions
36
*/
@@ -107,3 +110,5 @@ extern uint my_count_bits(ulonglong v);
107110
extern uint my_count_bits_ushort(ushort v);
108111
#endif /* HAVE_INLINE */
109112
C_MODE_END
113+
114+
#endif /* MY_BIT_INCLUDED */

include/my_libwrap.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_LIBWRAP_INCLUDED
2+
#define MY_LIBWRAP_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -25,3 +28,4 @@ extern int my_hosts_access(struct request_info *req);
2528
extern char *my_eval_client(struct request_info *req);
2629

2730
#endif /* HAVE_LIBWRAP */
31+
#endif /* MY_LIBWRAP_INCLUDED */

include/my_md5.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_MD5_INCLUDED
2+
#define MY_MD5_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -52,3 +55,5 @@ do { \
5255
my_MD5Update (&ctx, buf, len); \
5356
my_MD5Final (digest, &ctx); \
5457
} while (0)
58+
59+
#endif /* MY_MD__INCLUDED */

include/my_no_pthread.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_NO_PTHREAD_INCLUDED
2+
#define MY_NO_PTHREAD_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -14,9 +17,7 @@
1417
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1518

1619

17-
#if !defined(_my_no_pthread_h) && !defined(THREAD)
18-
#define _my_no_pthread_h
19-
20+
#ifndef THREAD
2021

2122
/*
2223
This block is to access some thread-related type definitions
@@ -48,3 +49,4 @@
4849
#define rwlock_destroy(A)
4950

5051
#endif
52+
#endif /* MY_NO_PTHREAD_INCLUDED */

include/my_uctype.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MY_UCTYPE_INCLUDED
2+
#define MY_UCTYPE_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -1477,3 +1480,4 @@ MY_UNI_CTYPE my_uni_ctype[256]={
14771480
};
14781481

14791482

1483+
#endif /* MY_UCTYPE_INCLUDED */

include/myisampack.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MYISAMPACK_INCLUDED
2+
#define MYISAMPACK_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -236,3 +239,4 @@
236239
mi_int4store(((T) + 4), A); }}
237240
#define mi_sizekorr(T) mi_uint4korr((uchar*) (T) + 4)
238241
#endif
242+
#endif /* MYISAMPACK_INCLUDED */

include/mysql_embed.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MYSQL_EMBED_INCLUDED
2+
#define MYSQL_EMBED_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -28,3 +31,4 @@
2831
#define DONT_USE_RAID
2932

3033
#endif /* EMBEDDED_LIBRARY */
34+
#endif /* MYSQL_EMBED_INCLUDED */

include/rijndael.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef RIJNDAEL_INCLUDED
2+
#define RIJNDAEL_INCLUDED
3+
14
/* Copyright (C) 2002 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -39,3 +42,5 @@ void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
3942
const uint8 pt[16], uint8 ct[16]);
4043
void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
4144
const uint8 ct[16], uint8 pt[16]);
45+
46+
#endif /* RIJNDAEL_INCLUDED */

include/sha1.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef SHA1_INCLUDED
2+
#define SHA1_INCLUDED
3+
14
/* Copyright (C) 2002, 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -64,3 +67,5 @@ int mysql_sha1_input(SHA1_CONTEXT*, const uint8 *, unsigned int);
6467
int mysql_sha1_result(SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE]);
6568

6669
C_MODE_END
70+
71+
#endif /* SHA__INCLUDED */

include/sql_common.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef SQL_COMMON_INCLUDED
2+
#define SQL_COMMON_INCLUDED
3+
14
/* Copyright (C) 2003-2004, 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -48,3 +51,4 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
4851

4952
#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
5053

54+
#endif /* SQL_COMMON_INCLUDED */

include/sslopt-case.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef SSLOPT_CASE_INCLUDED
2+
#define SSLOPT_CASE_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -26,3 +29,4 @@
2629
opt_use_ssl= 1;
2730
break;
2831
#endif
32+
#endif /* SSLOPT_CASE_INCLUDED */

include/sslopt-longopts.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef SSLOPT_LONGOPTS_INCLUDED
2+
#define SSLOPT_LONGOPTS_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -43,3 +46,4 @@
4346
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
4447
#endif
4548
#endif /* HAVE_OPENSSL */
49+
#endif /* SSLOPT_LONGOPTS_INCLUDED */

include/sslopt-vars.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef SSLOPT_VARS_INCLUDED
2+
#define SSLOPT_VARS_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -29,3 +32,4 @@ SSL_STATIC char *opt_ssl_key = 0;
2932
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
3033
#endif
3134
#endif
35+
#endif /* SSLOPT_VARS_INCLUDED */

libmysql/client_settings.h

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1515

16+
#ifndef CLIENT_SETTINGS_INCLUDED
17+
#define CLIENT_SETTINGS_INCLUDED
18+
#else
19+
#error You have already included an client_settings.h and it should not be included twice
20+
#endif /* CLIENT_SETTINGS_INCLUDED */
21+
1622
extern uint mysql_port;
1723
extern char * mysql_unix_port;
1824

mysys/my_handler_errors.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifndef MYSYS_MY_HANDLER_ERRORS_INCLUDED
2+
#define MYSYS_MY_HANDLER_ERRORS_INCLUDED
13

24
/*
35
Errors a handler can give you
@@ -66,3 +68,4 @@ static const char *handler_error_messages[]=
6668
"Too many active concurrent transactions"
6769
};
6870

71+
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */

mysys/my_static.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef MYSYS_MY_STATIC_INCLUDED
2+
#define MYSYS_MY_STATIC_INCLUDED
3+
14
/* Copyright (C) 2000 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -72,3 +75,5 @@ extern ulonglong query_performance_frequency, query_performance_offset;
7275
extern sigset_t my_signals; /* signals blocked by mf_brkhant */
7376
#endif
7477
C_MODE_END
78+
79+
#endif /* MYSYS_MY_STATIC_INCLUDED */

sql/authors.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef AUTHORS_INCLUDED
2+
#define AUTHORS_INCLUDED
3+
14
/* Copyright (C) 2005-2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -150,3 +153,5 @@ struct show_table_authors_st show_table_authors[]= {
150153
"SHA1(), AES_ENCRYPT(), AES_DECRYPT(), bug fixing" },
151154
{NULL, NULL, NULL}
152155
};
156+
157+
#endif /* AUTHORS_INCLUDED */

sql/client_settings.h

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1515

1616

17+
#ifndef CLIENT_SETTINGS_INCLUDED
18+
#define CLIENT_SETTINGS_INCLUDED
19+
#else
20+
#error You have already included an client_settings.h and it should not be included twice
21+
#endif /* CLIENT_SETTINGS_INCLUDED */
22+
1723
#include <thr_alarm.h>
1824

1925
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \

sql/contributors.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef CONTRIBUTORS_INCLUDED
2+
#define CONTRIBUTORS_INCLUDED
3+
14
/* Copyright (C) 2006 MySQL AB
25
36
This program is free software; you can redistribute it and/or modify
@@ -37,3 +40,5 @@ struct show_table_contributors_st show_table_contributors[]= {
3740
{"Mark Shuttleworth", "London, UK.", "EFF contribution for UC2006 Auction"},
3841
{NULL, NULL, NULL}
3942
};
43+
44+
#endif /* CONTRIBUTORS_INCLUDED */

0 commit comments

Comments
 (0)