Skip to content

Commit 61d112d

Browse files
author
Steinar H. Gunderson
committed
Bug #24710065: SPLIT MY_GLOBAL.H
Run include-what-you-use limited to adding <fcntl.h> and then re-sorting the #includes (and nothing else); then remove <fcntl.h> from my_global.h. Change-Id: I05b71998630cfbb0a939031d0f6d6041357ff3ba
1 parent 169ecec commit 61d112d

File tree

86 files changed

+131
-23
lines changed

Some content is hidden

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

86 files changed

+131
-23
lines changed

client/mysql.cc

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*
3131
**/
3232

33+
#include <fcntl.h>
3334
#include <m_ctype.h>
3435
#include <mf_wcomp.h> // wild_prefix, wild_one, wild_any
3536
#include <my_dir.h>

client/mysql_config_editor.cc

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
MySQL Configuration Utility
2323
*/
2424

25+
#include <fcntl.h>
2526
#include <signal.h>
2627
#include <stdlib.h>
2728

client/mysqladmin.cc

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
/* maintaince of mysql databases */
1919

20+
#include <fcntl.h>
2021
#include <my_thread.h> /* because of signal() */
2122
#include <mysql.h>
2223
#include <mysqld_error.h> /* to check server error codes */

client/mysqlbinlog.cc

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include "mysqlbinlog.h"
3232

33+
#include <fcntl.h>
3334
#include <signal.h>
3435
#include <stdlib.h>
3536
#include <algorithm>

client/mysqldump.cc

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
#define DUMP_VERSION "10.13"
4242

43+
#include <fcntl.h>
4344
#include <hash.h>
4445
#include <m_ctype.h>
4546
#include <m_string.h>

client/mysqlslap.cc

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define SELECT_TYPE_REQUIRES_PREFIX 5
8181
#define DELETE_TYPE_REQUIRES_PREFIX 6
8282

83+
#include <fcntl.h>
8384
#include <my_dir.h>
8485
#include <mysqld_error.h>
8586
#include <signal.h>

client/mysqltest.cc

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#define MTEST_VERSION "3.3"
2828

29+
#include <fcntl.h>
2930
#include <hash.h>
3031
#include <m_ctype.h>
3132
#include <mf_wcomp.h> // wild_compare

client/upgrade/program.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2006, 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,6 +15,7 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18+
#include <fcntl.h>
1819
#include <stdlib.h>
1920
#include <algorithm>
2021
#include <functional>

extra/comp_client_err.cc

+2-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
@@ -15,6 +15,7 @@
1515

1616

1717
#include <errmsg.h>
18+
#include <fcntl.h>
1819
#include <m_string.h>
1920
#include <my_getopt.h>
2021
#include <my_global.h>

extra/comp_err.cc

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include <assert.h>
28+
#include <fcntl.h>
2829
#include <m_ctype.h>
2930
#include <m_string.h>
3031
#include <my_dir.h>

extra/ibd2sdi.cc

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
1616

1717
*****************************************************************************/
1818

19+
#include <fcntl.h>
1920
#include <my_config.h>
2021
#include <my_global.h>
2122
#include <stdio.h>

extra/innochecksum.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
Published with a permission.
2626
*/
2727

28+
#include <fcntl.h>
2829
#include <my_config.h>
2930
#include <my_global.h>
3031
#include <stdio.h>
@@ -50,16 +51,16 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
5051
#include "buf0checksum.h"
5152
#include "fil0types.h"
5253
#include "fsp0fsp.h" /* fsp_flags_get_page_size() &
54+
5355
fsp_flags_get_zip_size() */
5456
#include "fut0lst.h" /* FLST_NODE_SIZE */
57+
#include "mach0data.h" /* mach_read_from_4() */
5558
#include "os0file.h"
5659
#include "page0page.h" /* PAGE_* */
5760
#include "page0size.h" /* page_size_t */
5861
#include "page0zip.h"
5962
#include "trx0undo.h" /* TRX_UNDO_* */
6063
#include "univ.i" /* include all of this */
61-
62-
#include "mach0data.h" /* mach_read_from_4() */
6364
#include "ut0crc32.h" /* ut_crc32_init() */
6465

6566
/* Global variables */

extra/resolve_stack_dump.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2001, 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
@@ -18,6 +18,7 @@
1818
*/
1919

2020
#include <errno.h>
21+
#include <fcntl.h>
2122
#include <m_ctype.h>
2223
#include <m_string.h>
2324
#include <my_config.h>

include/my_global.h

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include <assert.h>
2727
#include <errno.h> /* Recommended by debian */
28-
#include <fcntl.h>
2928
#include <float.h>
3029
#include <limits.h>
3130
#include <math.h>

libmysql/libmysql.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <m_ctype.h>
1718
#include <m_string.h>
1819
#include <my_global.h>

mysys/my_pread.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 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
@@ -20,9 +20,11 @@
2020
#include "my_config.h"
2121

2222
#include <errno.h>
23+
#include <fcntl.h>
2324
#include <stddef.h>
2425
#include <stdio.h>
2526
#include <sys/types.h>
27+
2628
#ifdef HAVE_UNISTD_H
2729
#include <unistd.h>
2830
#endif

mysys_ssl/my_default.cc

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
the login file.
3838
*/
3939

40+
#include <fcntl.h>
4041
#include <my_aes.h>
4142
#include <my_dir.h>
4243
#include <my_getopt.h>

plugin/daemon_example/daemon_example.cc

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

1616
#include <ctype.h>
17+
#include <fcntl.h>
1718
#include <my_dir.h>
1819
#include <my_global.h>
1920
#include <mysql/plugin.h>

plugin/keyring/buffered_file_io.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/psi/mysql_file.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_session_detach.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_session_in_thd.cc

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

1616
#include <ctype.h>
17+
#include <fcntl.h>
1718
#include <my_dir.h>
1819
#include <my_global.h>
1920
#include <mysql/plugin.h>

plugin/test_service_sql_api/test_session_info.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_sql_2_sessions.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_all_col_types.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_cmds_1.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <mysql/service_srv_session_info.h>

plugin/test_service_sql_api/test_sql_commit.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_complex.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_errors.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_lock.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_sql_processlist.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_sql_replication.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_shutdown.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_sql_sqlmode.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_stmt.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_sql_stored_procedures_functions.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_sql_views_triggers.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdio.h>

plugin/test_service_sql_api/test_x_sessions_deinit.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_service_sql_api/test_x_sessions_init.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <stdlib.h>

plugin/test_services/test_services.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <mysql_version.h>

plugin/test_services/test_services_threaded.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16+
#include <fcntl.h>
1617
#include <my_global.h>
1718
#include <mysql/plugin.h>
1819
#include <mysql_version.h>

rapid/plugin/x/ngs/ngs_common/operations_factory.cc

+6-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
55
* modify it under the terms of the GNU General Public License as
@@ -18,12 +18,15 @@
1818
*/
1919

2020
#include "ngs_common/operations_factory.h"
21+
22+
#include <fcntl.h>
23+
2124
#include "ngs/memory.h"
2225

2326
#ifdef HAVE_SYS_UN_H
24-
#include <sys/un.h>
25-
#include <sys/types.h>
2627
#include <signal.h>
28+
#include <sys/types.h>
29+
#include <sys/un.h>
2730
#endif
2831

2932

0 commit comments

Comments
 (0)