add (or restore) config.h to all files

The autoconf-generated config.h contains a number of directives which
may alter the behaviour of system headers on certain platforms. Always
include it in every C++ file as the first include.

Closes #2993.
This commit is contained in:
David Adam 2016-05-18 22:30:21 +00:00
parent 00e32a0909
commit 9225b16d12
39 changed files with 75 additions and 0 deletions

View File

@ -1,4 +1,6 @@
// The classes responsible for autoloading functions and completions.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <pthread.h>

View File

@ -15,6 +15,7 @@
// Check the other builtin manuals for proper syntax.
//
// 4). Use 'git add doc_src/NAME.txt' to start tracking changes to the documentation file.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>

View File

@ -1,4 +1,6 @@
// Functions used for implementing the commandline builtin.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <pthread.h>

View File

@ -1,4 +1,6 @@
// Functions used for implementing the complete builtin.
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
#include <stdlib.h>
#include <wchar.h>

View File

@ -48,6 +48,7 @@
// David MacKenzie <djm@gnu.ai.mit.edu>
// This file has been imported from source code of printf command in GNU Coreutils version 6.9.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <limits.h>

View File

@ -1,4 +1,6 @@
// Functions used for implementing the set builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>

View File

@ -1,6 +1,8 @@
// Functions used for implementing the test builtin.
//
// Implemented from scratch (yes, really) by way of IEEE 1003.1 as reference.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>

View File

@ -1,4 +1,6 @@
// Functions used for implementing the ulimit builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <sys/resource.h>
#include <wchar.h>

View File

@ -1,4 +1,6 @@
// Color class implementation.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -3,6 +3,8 @@
These functions are used for storing and retrieving tab-completion data, as well as for performing
tab-completion.
*/
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <pthread.h>
#include <pwd.h>

View File

@ -1,4 +1,6 @@
// Functions for setting and getting environment variables.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <locale.h>

View File

@ -1,4 +1,6 @@
// Functions for handling event triggers.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <signal.h>
#include <stdbool.h>

View File

@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <getopt.h>
#include <locale.h>

View File

@ -6,6 +6,8 @@
// carriage-return (\cM) and newline (\cJ).
//
// Type "exit" or "quit" to terminate the program.
#include "config.h" // IWYU pragma: keep
#include <getopt.h>
#include <locale.h>
#include <signal.h>

View File

@ -1,4 +1,5 @@
// Various bug and feature tests. Compiled and run by make test.
#include "config.h" // IWYU pragma: keep
// IWYU pragma: no_include <cstring>
// IWYU pragma: no_include <cstddef>

View File

@ -2,6 +2,8 @@
// autoloading functions in the $fish_function_path. Actual function evaluation is taken care of by
// the parser and to some degree the builtin handling library.
//
#include "config.h" // IWYU pragma: keep
// IWYU pragma: no_include <type_traits>
#include <dirent.h>
#include <pthread.h>

View File

@ -1,4 +1,6 @@
// Functions for syntax highlighting.
#include "config.h" // IWYU pragma: keep
// IWYU pragma: no_include <cstddef>
#include <dirent.h>
#include <errno.h>

View File

@ -1,4 +1,6 @@
// History functions, part of the user interface.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <ctype.h>
#include <errno.h>

View File

@ -1,4 +1,6 @@
// Library for pooling common strings.
#include "config.h" // IWYU pragma: keep
#include <pthread.h>
#include <stdbool.h>
#include <stddef.h>

View File

@ -1,4 +1,6 @@
// Utilities for io redirection.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <stddef.h>

View File

@ -1,3 +1,5 @@
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <fcntl.h>
#include <limits.h>

View File

@ -2,6 +2,8 @@
//
// Works like the killring in emacs and readline. The killring is cut and paste with a memory of
// previous cuts. It supports integration with the X clipboard.
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
#include <stddef.h>
#include <algorithm>

View File

@ -1,3 +1,5 @@
#include "config.h" // IWYU pragma: keep
// IWYU pragma: no_include <cstddef>
#include <assert.h>
#include <stddef.h>

View File

@ -6,6 +6,8 @@
//
// Non-fatal errors are printed as soon as they are encountered; otherwise you would have to wait
// for the execution to finish to see them.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <stdarg.h>

View File

@ -1,3 +1,5 @@
#include "config.h" // IWYU pragma: keep
#include <stdio.h>
#include "common.h"

View File

@ -1,4 +1,6 @@
// Programmatic representation of fish code.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>

View File

@ -2,6 +2,8 @@
//
// This library can be seen as a 'toolbox' for functions that are used in many places in fish and
// that are somehow related to parsing the code.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>

View File

@ -1,4 +1,6 @@
// The fish parser. Contains functions for parsing and evaluating code.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>

View File

@ -1,4 +1,6 @@
// Functions having to do with parser keywords, like testing if a function is a block command.
#include "config.h" // IWYU pragma: keep
#include "parser_keywords.h"
#include "common.h"
#include "fallback.h" // IWYU pragma: keep

View File

@ -1,6 +1,8 @@
// Directory utilities. This library contains functions for locating configuration directories, for
// testing if a command with a given name can be found in the PATH, and various other path-related
// issues.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <errno.h>
#include <sys/stat.h>

View File

@ -1,4 +1,6 @@
// Functions that we may safely call after fork().
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <fcntl.h>
#include <signal.h>

View File

@ -1,4 +1,6 @@
// Print help message for the specified command.
#include "config.h" // IWYU pragma: keep
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,4 +1,6 @@
// Functions for performing sanity checks on the program state.
#include "config.h" // IWYU pragma: keep
#include <unistd.h>
#include "common.h"

View File

@ -1,4 +1,6 @@
// The library for various signal related issues.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <signal.h>
#include <stdio.h>

View File

@ -1,5 +1,7 @@
// A specialized tokenizer for tokenizing the fish language. In the future, the tokenizer should be
// extended to support marks, tokenizing multiple strings and disposing of unused string segments.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <fcntl.h>
#include <limits.h>

View File

@ -13,6 +13,8 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h" // IWYU pragma: keep
#include <stdint.h> // IWYU pragma: keep
#include <sys/types.h>
#include <limits>

View File

@ -1,6 +1,8 @@
// Generic utilities library.
//
// Contains data structures such as automatically growing array lists, priority queues, etc.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stdlib.h>
#include <sys/time.h>

View File

@ -1,4 +1,6 @@
// Helper functions for working with wcstring.
#include "config.h" // IWYU pragma: keep
#include "wcstringutil.h"
#include "common.h"

View File

@ -1,5 +1,7 @@
// Fish needs it's own globbing implementation to support tab-expansion of globbed parameters. Also
// provides recursive wildcards using **.
#include "config.h" // IWYU pragma: keep
#include <assert.h>
#include <dirent.h>
#include <errno.h>