Skip to content

Commit b3aeb1d

Browse files
author
Steinar H. Gunderson
committed
Bug #24710065: SPLIT MY_GLOBAL.H
Run include-what-you-use limited to adding <sys/types.h> and then re-sorting the #includes (and nothing else); then remove <sys/types.h> from my_global.h. Change-Id: Iafb6783d4c6841029bfc02a5727fc2a911d88bfc
1 parent d34d68e commit b3aeb1d

File tree

405 files changed

+810
-204
lines changed

Some content is hidden

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

405 files changed

+810
-204
lines changed

client/base/debug_options.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18+
#include "client/base/debug_options.h"
19+
1820
#include <stdlib.h>
21+
#include <sys/types.h>
1922
#include <functional>
2023

2124
#include "abstract_program.h"
2225
#include "client_priv.h"
23-
#include "debug_options.h"
2426
#include "my_dbug.h"
2527

2628
using namespace Mysql::Tools::Base::Options;

client/base/mysql_query_runner.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -15,11 +15,13 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18+
#include "client/base/mysql_query_runner.h"
19+
1820
#include <stdlib.h>
21+
#include <sys/types.h>
1922
#include <functional>
2023

2124
#include "m_ctype.h"
22-
#include "mysql_query_runner.h"
2325
#include "sql_string.h"
2426
#include "template_utils.h"
2527

client/check/mysqlcheck.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -18,14 +18,15 @@
1818
#ifndef MYSQLCHECK_INCLUDED
1919
#define MYSQLCHECK_INCLUDED
2020

21+
#include <sys/types.h>
2122
#include <string>
2223
#include <vector>
2324

2425
namespace Mysql{
2526
namespace Tools{
2627
namespace Check{
2728

28-
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
29+
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
2930

3031
extern void mysql_check(MYSQL* connection, int what_to_do, my_bool opt_alldbs,
3132
my_bool opt_check_only_changed, my_bool opt_extended,

client/check/mysqlcheck_core.cc

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <m_ctype.h>
1919
#include <mysql_version.h>
2020
#include <mysqld_error.h>
21+
#include <sys/types.h>
2122
#include <string>
2223
#include <vector>
2324

client/dump/abstract_mysql_chain_element_extension.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#ifndef ABSTRACT_MYSQL_CHAIN_ELEMENT_EXTENSION_INCLUDED
1919
#define ABSTRACT_MYSQL_CHAIN_ELEMENT_EXTENSION_INCLUDED
2020

21+
#include <sys/types.h>
2122
#include <functional>
2223

2324
#include "abstract_data_object.h"

client/dump/compression_zlib_writer.h

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define COMPRESSION_ZLIB_WRITER_INCLUDED
2020

2121
#include <string.h>
22+
#include <sys/types.h>
2223
#include <functional>
2324

2425
#include "abstract_output_writer_wrapper.h"

client/dump/mysql_field.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -18,9 +18,11 @@
1818
#ifndef MYSQL_FIELD_INCLUDED
1919
#define MYSQL_FIELD_INCLUDED
2020

21+
#include <sys/types.h>
22+
#include <string>
23+
2124
#include "my_global.h"
2225
#include "mysql.h"
23-
#include <string>
2426

2527
namespace Mysql{
2628
namespace Tools{

client/dump/mysql_object_reader.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -15,10 +15,11 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18-
#include <functional>
18+
#include "client/dump/mysql_object_reader.h"
1919

20-
#include "mysql_object_reader.h"
2120
#include <boost/algorithm/string.hpp>
21+
#include <sys/types.h>
22+
#include <functional>
2223

2324
using namespace Mysql::Tools::Dump;
2425
using std::placeholders::_1;

client/dump/object_queue.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#ifndef OBJECT_QUEUE_INCLUDED
1919
#define OBJECT_QUEUE_INCLUDED
2020

21+
#include <sys/types.h>
2122
#include <functional>
2223
#include <map>
2324
#include <queue>

client/dump/sql_formatter.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18+
#include "client/dump/sql_formatter.h"
19+
1820
#include "my_config.h"
1921

2022
#include <boost/algorithm/string.hpp>
23+
#include <sys/types.h>
2124
#include <chrono>
2225
#include <functional>
2326
#include <sstream>
2427

2528
#include "mysql_function.h"
2629
#include "privilege.h"
27-
#include "sql_formatter.h"
2830
#include "stored_procedure.h"
2931
#include "view.h"
3032

client/mysql.cc

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <signal.h>
4141
#include <stdarg.h>
4242
#include <stdlib.h>
43+
#include <sys/types.h>
4344
#include <violite.h>
4445

4546
#include "client_priv.h"

client/mysql_config_editor.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
MySQL Configuration Utility
2323
*/
2424

25+
#include "my_config.h"
26+
2527
#include <errno.h>
2628
#include <fcntl.h>
2729
#include <signal.h>
2830
#include <stdlib.h>
31+
#include <sys/types.h>
2932

3033
#include "client_priv.h"
3134
#include "my_aes.h"
3235
#include "my_compiler.h"
33-
#include "my_config.h"
3436
#include "my_dbug.h"
3537
#include "my_default.h"
3638
#include "my_default_priv.h"

client/mysql_secure_installation.cc

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <stdlib.h>
19+
#include <sys/types.h>
1920
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
2021

2122
#include "client_priv.h"

client/mysqladmin.cc

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <sql_common.h>
2626
#include <stdlib.h>
2727
#include <sys/stat.h>
28+
#include <sys/types.h>
2829
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2930
#include <string>
3031

client/mysqlbinlog.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
1717
#define MYSQLBINLOG_INCLUDED
1818

1919
#include <stdarg.h>
20+
#include <sys/types.h>
2021

2122
#include "my_compiler.h"
2223
#include "my_inttypes.h"

client/mysqldump.cc

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include <stdarg.h>
5454
#include <stdio.h>
5555
#include <stdlib.h>
56+
#include <sys/types.h>
5657
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
5758

5859
#include "client_priv.h"

client/mysqlimport.cc

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323
#include <stdlib.h>
24+
#include <sys/types.h>
2425
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2526

2627
#include "client_priv.h"

client/mysqlshow.cc

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <sslopt-vars.h>
2626
#include <stdarg.h>
2727
#include <stdlib.h>
28+
#include <sys/types.h>
2829
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2930

3031
#include "client_priv.h"

client/mysqltest.cc

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <sql_common.h>
4141
#include <stdarg.h>
4242
#include <stdlib.h>
43+
#include <sys/types.h>
4344
#include <violite.h>
4445
#include <cmath> // std::isinf
4546

client/readline.cc

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <my_global.h>
2323
#include <my_sys.h>
2424
#include <stdio.h>
25+
#include <sys/types.h>
2526

2627
#include "my_dbug.h"
2728
#include "my_inttypes.h"

client/upgrade/program.cc

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <errno.h>
1919
#include <fcntl.h>
2020
#include <stdlib.h>
21+
#include <sys/types.h>
2122
#include <algorithm>
2223
#include <functional>
2324
#include <iostream>

dbug/dbug.c

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#include <my_global.h>
8888
#include <stdio.h>
8989
#include <stdlib.h>
90+
#include <sys/types.h>
9091

9192
#include "my_compiler.h"
9293
#include "my_dbug.h"

include/ft_global.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef FT_GLOBAL_INCLUDED
22
#define FT_GLOBAL_INCLUDED
33

4-
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
4+
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
55

66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU General Public License as published by
@@ -25,9 +25,11 @@
2525

2626
/* #include "myisam.h" */
2727

28+
#include <sys/types.h>
29+
30+
#include "m_ctype.h"
2831
#include "my_base.h"
2932
#include "my_inttypes.h"
30-
#include "m_ctype.h"
3133

3234
#ifdef __cplusplus
3335
extern "C" {

include/my_global.h

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <limits.h>
2929
#include <math.h>
3030
#include <stdarg.h>
31-
#include <sys/types.h>
3231
#include <time.h>
3332

3433
#endif // MY_GLOBAL_INCLUDED

include/my_sys.h

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#endif
4545
#include <stdio.h>
4646
#include <string.h>
47+
#include <sys/types.h>
4748

4849
#include "mysql/psi/mysql_cond.h" /* mysql_cond_t */
4950
#include "mysql/psi/mysql_mutex.h" /* mysql_mutex_t */

include/myisam.h

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include "my_config.h"
2626

27+
#include <sys/types.h>
28+
2729
#include "keycache.h"
2830
#include "m_ctype.h"
2931
#include "m_string.h"

include/pfs_cond_provider.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
2121
Performance schema instrumentation (declarations).
2222
*/
2323

24+
#include <sys/types.h>
25+
2426
#include "my_psi_config.h"
2527

2628
#ifdef HAVE_PSI_COND_INTERFACE

include/pfs_error_provider.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
2121
Performance schema instrumentation (declarations).
2222
*/
2323

24+
#include <sys/types.h>
25+
2426
#include "my_psi_config.h"
2527

2628
#ifdef HAVE_PSI_ERROR_INTERFACE

include/pfs_file_provider.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
2121
Performance schema instrumentation (declarations).
2222
*/
2323

24+
#include <sys/types.h>
25+
2426
#include "my_psi_config.h"
2527

2628
#ifdef HAVE_PSI_FILE_INTERFACE
@@ -29,9 +31,9 @@
2931

3032
#include <stddef.h>
3133

34+
#include "my_inttypes.h"
3235
#include "my_io.h"
3336
#include "my_macros.h"
34-
#include "my_inttypes.h"
3537
#include "mysql/psi/psi_file.h"
3638

3739
#define PSI_FILE_CALL(M) pfs_ ## M ## _v1

include/pfs_mutex_provider.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
2121
Performance schema instrumentation (declarations).
2222
*/
2323

24+
#include <sys/types.h>
25+
2426
#include "my_psi_config.h"
2527

2628
#ifdef HAVE_PSI_MUTEX_INTERFACE

0 commit comments

Comments
 (0)