Commit 15e90a3c authored by Brad King's avatar Brad King

Sort includes to stabilize include order w.r.t. clang-format

The clang-format tool sorts `#include` lines within contiguous blocks.
Separate blocks with blank lines and sort the include lines within them
so that clang-format does not re-order anything.

Change-Id: I96d6828f470b9a234464972172d46afab322487c
parent 37306a1c
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
# include "String.hxx.in" # include "String.hxx.in"
#endif #endif
#include <vector> #include <iostream>
#include <map> #include <map>
#include <set> #include <set>
#include <sstream> #include <sstream>
#include <iostream> #include <vector>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -13,13 +13,15 @@ ...@@ -13,13 +13,15 @@
#define @KWSYS_NAMESPACE@_ConsoleBuf_hxx #define @KWSYS_NAMESPACE@_ConsoleBuf_hxx
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <@KWSYS_NAMESPACE@/Encoding.hxx> #include <@KWSYS_NAMESPACE@/Encoding.hxx>
#include <string>
#include <cstring> #include <cstring>
#include <sstream>
#include <streambuf>
#include <iostream> #include <iostream>
#include <sstream>
#include <stdexcept> #include <stdexcept>
#include <streambuf>
#include <string>
#if defined(_WIN32) #if defined(_WIN32)
# include <windows.h> # include <windows.h>
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "Directory.hxx.in" #include "Configure.hxx.in"
# include "Configure.hxx.in" #include "Directory.hxx.in"
# include "Encoding.hxx.in" #include "Encoding.hxx.in"
#endif #endif
#include <string> #include <string>
...@@ -88,9 +88,10 @@ void Directory::Clear() ...@@ -88,9 +88,10 @@ void Directory::Clear()
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#include <io.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h> #include <fcntl.h>
#include <io.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -209,6 +210,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name) ...@@ -209,6 +210,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
// Now the POSIX style directory access // Now the POSIX style directory access
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
// PGI with glibc has trouble with dirent and large file support: // PGI with glibc has trouble with dirent and large file support:
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define @KWSYS_NAMESPACE@_Directory_hxx #define @KWSYS_NAMESPACE@_Directory_hxx
#include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.h>
#include <string> #include <string>
namespace @KWSYS_NAMESPACE@ namespace @KWSYS_NAMESPACE@
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "DynamicLoader.hxx.in" #include "Configure.hxx.in"
# include "Configure.hxx.in" #include "DynamicLoader.hxx.in"
#endif #endif
// This file is actually 3 different implementations. // This file is actually 3 different implementations.
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
// --------------------------------------------------------------- // ---------------------------------------------------------------
// 1. Implementation for HPUX machines // 1. Implementation for HPUX machines
#ifdef __hpux #ifdef __hpux
#include <errno.h>
#include <dl.h> #include <dl.h>
#include <errno.h>
#define DYNAMICLOADER_DEFINED 1 #define DYNAMICLOADER_DEFINED 1
namespace KWSYS_NAMESPACE namespace KWSYS_NAMESPACE
...@@ -107,8 +107,8 @@ const char* DynamicLoader::LastError() ...@@ -107,8 +107,8 @@ const char* DynamicLoader::LastError()
// 2. Implementation for Mac OS X 10.2.x and earlier // 2. Implementation for Mac OS X 10.2.x and earlier
#ifdef __APPLE__ #ifdef __APPLE__
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
#include <string.h> // for strlen
#include <mach-o/dyld.h> #include <mach-o/dyld.h>
#include <string.h> // for strlen
#define DYNAMICLOADER_DEFINED 1 #define DYNAMICLOADER_DEFINED 1
namespace KWSYS_NAMESPACE namespace KWSYS_NAMESPACE
...@@ -428,10 +428,10 @@ const char* DynamicLoader::LastError() ...@@ -428,10 +428,10 @@ const char* DynamicLoader::LastError()
#ifdef __MINT__ #ifdef __MINT__
#define DYNAMICLOADER_DEFINED 1 #define DYNAMICLOADER_DEFINED 1
#define _GNU_SOURCE /* for program_invocation_name */ #define _GNU_SOURCE /* for program_invocation_name */
#include <string.h>
#include <malloc.h>
#include <errno.h>
#include <dld.h> #include <dld.h>
#include <errno.h>
#include <malloc.h>
#include <string.h>
namespace KWSYS_NAMESPACE namespace KWSYS_NAMESPACE
{ {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define @KWSYS_NAMESPACE@_DynamicLoader_hxx #define @KWSYS_NAMESPACE@_DynamicLoader_hxx
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <string> #include <string>
#if defined(__hpux) #if defined(__hpux)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define @KWSYS_NAMESPACE@_Encoding_h #define @KWSYS_NAMESPACE@_Encoding_h
#include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.h>
#include <wchar.h> #include <wchar.h>
/* Redefine all public interface symbol names to be in the proper /* Redefine all public interface symbol names to be in the proper
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define @KWSYS_NAMESPACE@_Encoding_hxx #define @KWSYS_NAMESPACE@_Encoding_hxx
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <string> #include <string>
#include <vector> #include <vector>
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "Encoding.hxx.in" #include "Encoding.h.in"
# include "Encoding.h.in" #include "Encoding.hxx.in"
#endif #endif
#include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <vector>
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (disable: 4786) # pragma warning (disable: 4786)
...@@ -37,8 +37,9 @@ ...@@ -37,8 +37,9 @@
// Windows API. // Windows API.
#if defined(_WIN32) #if defined(_WIN32)
# include <windows.h> #include <windows.h>
# include <shellapi.h>
#include <shellapi.h>
#endif #endif
namespace KWSYS_NAMESPACE namespace KWSYS_NAMESPACE
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#ifndef @KWSYS_NAMESPACE@_FStream_hxx #ifndef @KWSYS_NAMESPACE@_FStream_hxx
#define @KWSYS_NAMESPACE@_FStream_hxx #define @KWSYS_NAMESPACE@_FStream_hxx
#include <fstream>
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <@KWSYS_NAMESPACE@/Encoding.hxx> #include <@KWSYS_NAMESPACE@/Encoding.hxx>
#include <fstream>
#if defined(_WIN32) #if defined(_WIN32)
# if !defined(_MSC_VER) && @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H # if !defined(_MSC_VER) && @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H
# include <ext/stdio_filebuf.h> # include <ext/stdio_filebuf.h>
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "Glob.hxx.in" #include "Configure.hxx.in"
# include "Directory.hxx.in" #include "Directory.hxx.in"
# include "Configure.hxx.in" #include "Glob.hxx.in"
# include "RegularExpression.hxx.in" #include "RegularExpression.hxx.in"
# include "SystemTools.hxx.in" #include "SystemTools.hxx.in"
#endif #endif
#include <algorithm>
#include <string> #include <string>
#include <vector> #include <vector>
#include <algorithm>
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -53,22 +53,22 @@ do. ...@@ -53,22 +53,22 @@ do.
# define FD_SETSIZE 16384 # define FD_SETSIZE 16384
#endif #endif
#include <assert.h> /* assert */
#include <ctype.h> /* isspace */
#include <dirent.h> /* DIR, dirent */
#include <errno.h> /* errno */
#include <fcntl.h> /* fcntl */
#include <signal.h> /* sigaction */
#include <stddef.h> /* ptrdiff_t */ #include <stddef.h> /* ptrdiff_t */
#include <stdio.h> /* snprintf */ #include <stdio.h> /* snprintf */
#include <stdlib.h> /* malloc, free */ #include <stdlib.h> /* malloc, free */
#include <string.h> /* strdup, strerror, memset */ #include <string.h> /* strdup, strerror, memset */
#include <sys/stat.h> /* open mode */
#include <sys/time.h> /* struct timeval */ #include <sys/time.h> /* struct timeval */
#include <sys/types.h> /* pid_t, fd_set */ #include <sys/types.h> /* pid_t, fd_set */
#include <sys/wait.h> /* waitpid */ #include <sys/wait.h> /* waitpid */
#include <sys/stat.h> /* open mode */
#include <unistd.h> /* pipe, close, fork, execvp, select, _exit */
#include <fcntl.h> /* fcntl */
#include <errno.h> /* errno */
#include <time.h> /* gettimeofday */ #include <time.h> /* gettimeofday */
#include <signal.h> /* sigaction */ #include <unistd.h> /* pipe, close, fork, execvp, select, _exit */
#include <dirent.h> /* DIR, dirent */
#include <ctype.h> /* isspace */
#include <assert.h> /* assert */
#if defined(__VMS) #if defined(__VMS)
# define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK # define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
/* Work-around CMake dependency scanning limitation. This must /* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */ duplicate the above list of headers. */
#if 0 #if 0
# include "Process.h.in" #include "Encoding.h.in"
# include "Encoding.h.in" #include "Process.h.in"
#endif #endif
/* /*
...@@ -37,9 +37,9 @@ a UNIX-style select system call. ...@@ -37,9 +37,9 @@ a UNIX-style select system call.
#if defined(_MSC_VER) && _MSC_VER >= 1800 #if defined(_MSC_VER) && _MSC_VER >= 1800
# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
#endif #endif
#include <string.h> /* strlen, strdup */ #include <io.h> /* _unlink */
#include <stdio.h> /* sprintf */ #include <stdio.h> /* sprintf */
#include <io.h> /* _unlink */ #include <string.h> /* strlen, strdup */
#ifdef __WATCOMC__ #ifdef __WATCOMC__
#define _unlink unlink #define _unlink unlink
#endif #endif
......
...@@ -160,21 +160,22 @@ ...@@ -160,21 +160,22 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
/* Include needed system headers. */ /* Include needed system headers. */
#include <stddef.h> /* size_t */ #include <errno.h>
#include <limits.h> #include <limits.h>
#include <stddef.h> /* size_t */
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <stdio.h>
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
# include <io.h> #include <windows.h>
# include <windows.h>
# include <process.h> #include <io.h>
# define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */ #include <process.h>
#define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */
#else #else
# include <unistd.h> #include <sys/stat.h>
# include <sys/stat.h> #include <unistd.h>
#endif #endif
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
# include "System.h.in" # include "System.h.in"
#endif #endif
#include <ctype.h> /* isspace */
#include <stddef.h> /* ptrdiff_t */ #include <stddef.h> /* ptrdiff_t */
#include <stdlib.h> /* malloc, free */ #include <stdlib.h> /* malloc, free */
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include <ctype.h> /* isspace */
#include <stdio.h> #include <stdio.h>
......
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "SystemInformation.hxx.in" #include "Process.h.in"
# include "Process.h.in" #include "SystemInformation.hxx.in"
#endif #endif
#include <fstream>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <fstream>
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -64,14 +64,15 @@ ...@@ -64,14 +64,15 @@
typedef int siginfo_t; typedef int siginfo_t;
# endif # endif
#else #else
# include <sys/types.h> #include <sys/types.h>
# include <sys/time.h>
# include <sys/utsname.h> // int uname(struct utsname *buf); #include <errno.h> // extern int errno;
# include <sys/resource.h> // getrlimit #include <fcntl.h>
# include <unistd.h> #include <signal.h>
# include <signal.h> #include <sys/resource.h> // getrlimit
# include <fcntl.h> #include <sys/time.h>
# include <errno.h> // extern int errno; #include <sys/utsname.h> // int uname(struct utsname *buf);
#include <unistd.h>
#endif #endif
#if defined (__CYGWIN__) && !defined(_WIN32) #if defined (__CYGWIN__) && !defined(_WIN32)
...@@ -80,15 +81,15 @@ typedef int siginfo_t; ...@@ -80,15 +81,15 @@ typedef int siginfo_t;
#endif #endif
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
# include <sys/param.h> #include <netdb.h>
# include <sys/sysctl.h> #include <netinet/in.h>
# include <sys/socket.h> #include <sys/param.h>
# include <netdb.h> #include <sys/socket.h>
# include <netinet/in.h> #include <sys/sysctl.h>
# if defined(KWSYS_SYS_HAS_IFADDRS_H) #if defined(KWSYS_SYS_HAS_IFADDRS_H)
# include <ifaddrs.h> #include <ifaddrs.h>
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN #define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif #endif
#endif #endif
#if defined(KWSYS_SYS_HAS_MACHINE_CPU_H) #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H)
...@@ -96,36 +97,36 @@ typedef int siginfo_t; ...@@ -96,36 +97,36 @@ typedef int siginfo_t;
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <sys/sysctl.h> #include <fenv.h>
# include <mach/vm_statistics.h> #include <mach/host_info.h>
# include <mach/host_info.h> #include <mach/mach.h>
# include <mach/mach.h> #include <mach/mach_types.h>
# include <mach/mach_types.h> #include <mach/vm_statistics.h>
# include <fenv.h> #include <netdb.h>
# include <sys/socket.h> #include <netinet/in.h>
# include <netdb.h> #include <sys/socket.h>
# include <netinet/in.h> #include <sys/sysctl.h>
# if defined(KWSYS_SYS_HAS_IFADDRS_H) #if defined(KWSYS_SYS_HAS_IFADDRS_H)
# include <ifaddrs.h> #include <ifaddrs.h>
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN #define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif #endif
# if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050) #if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0 >= 1050)
# undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE #undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
# endif #endif
#endif #endif
#if defined(__linux) || defined (__sun) || defined(_SCO_DS) #if defined(__linux) || defined(__sun) || defined(_SCO_DS)
# include <fenv.h> #include <fenv.h>
# include <sys/socket.h> #include <netdb.h>
# include <netdb.h> #include <netinet/in.h>
# include <netinet/in.h> #include <sys/socket.h>
# if defined(KWSYS_SYS_HAS_IFADDRS_H) #if defined(KWSYS_SYS_HAS_IFADDRS_H)
# include <ifaddrs.h> #include <ifaddrs.h>
# if !defined(__LSB_VERSION__) /* LSB has no getifaddrs */ #if !defined(__LSB_VERSION__) /* LSB has no getifaddrs */
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN #define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif #endif
# endif #endif
# if defined(KWSYS_CXX_HAS_RLIMIT64) #if defined(KWSYS_CXX_HAS_RLIMIT64)
typedef struct rlimit64 ResourceLimitType; typedef struct rlimit64 ResourceLimitType;
# define GetResourceLimit getrlimit64 # define GetResourceLimit getrlimit64
# else # else
...@@ -157,11 +158,11 @@ typedef struct rlimit ResourceLimitType; ...@@ -157,11 +158,11 @@ typedef struct rlimit ResourceLimitType;
# undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP # undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP
#endif #endif
#include <ctype.h> // int isdigit(int c);
#include <memory.h> #include <memory.h>
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> // int isdigit(int c);
#if defined(KWSYS_USE_LONG_LONG) #if defined(KWSYS_USE_LONG_LONG)
# if defined(KWSYS_IOS_HAS_OSTREAM_LONG_LONG) # if defined(KWSYS_IOS_HAS_OSTREAM_LONG_LONG)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define @KWSYS_NAMESPACE@_SystemInformation_h #define @KWSYS_NAMESPACE@_SystemInformation_h
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <stddef.h> /* size_t */ #include <stddef.h> /* size_t */
#include <string> #include <string>
......
...@@ -31,20 +31,20 @@ ...@@ -31,20 +31,20 @@
#include KWSYS_HEADER(FStream.hxx) #include KWSYS_HEADER(FStream.hxx)
#include KWSYS_HEADER(Encoding.hxx) #include KWSYS_HEADER(Encoding.hxx)
#include <iostream>
#include <fstream> #include <fstream>
#include <sstream> #include <iostream>
#include <set> #include <set>
#include <sstream>
#include <vector> #include <vector>
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.