KWSys 2018-06-01 (8ef62b28)

Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 8ef62b289e0a99856893ef49106c2b2d94e9dd0c (master).

Upstream Shortlog
-----------------

Brad King (2):
      6b9c233c clang-format.bash: update to clang-format-6.0
      b7a341cf Empty commit at end of history preceding clang-format-6.0 style transition

Kitware Robot (1):
      828b6837 Revise C++ coding style using clang-format-6.0
This commit is contained in:
KWSys Upstream
2018-06-01 12:53:33 -04:00
committed by Brad King
parent 1f52cb087a
commit 3af8c7715b
60 changed files with 1668 additions and 1637 deletions

View File

@@ -7,8 +7,8 @@
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
#include "Encoding.h.in"
#include "Process.h.in"
# include "Encoding.h.in"
# include "Process.h.in"
#endif
#include <assert.h>
@@ -18,21 +18,21 @@
#include <string.h>
#if defined(_WIN32)
#include <windows.h>
# include <windows.h>
#else
#include <signal.h>
#include <unistd.h>
# include <signal.h>
# include <unistd.h>
#endif
#if defined(__BORLANDC__)
#pragma warn - 8060 /* possibly incorrect assignment */
# pragma warn - 8060 /* possibly incorrect assignment */
#endif
/* Platform-specific sleep functions. */
#if defined(__BEOS__) && !defined(__ZETA__)
/* BeOS 5 doesn't have usleep(), but it has snooze(), which is identical. */
#include <be/kernel/OS.h>
# include <be/kernel/OS.h>
static inline void testProcess_usleep(unsigned int usec)
{
snooze(usec);
@@ -44,7 +44,7 @@ static void testProcess_usleep(unsigned int usec)
Sleep(usec / 1000);
}
#else
#define testProcess_usleep usleep
# define testProcess_usleep usleep
#endif
#if defined(_WIN32)
@@ -481,20 +481,23 @@ static int runChild2(kwsysProcess* kp, const char* cmd[], int state,
if (result) {
if (exception != kwsysProcess_GetExitException(kp)) {
fprintf(stderr, "Mismatch in exit exception. "
"Should have been %d, was %d.\n",
fprintf(stderr,
"Mismatch in exit exception. "
"Should have been %d, was %d.\n",
exception, kwsysProcess_GetExitException(kp));
}
if (value != kwsysProcess_GetExitValue(kp)) {
fprintf(stderr, "Mismatch in exit value. "
"Should have been %d, was %d.\n",
fprintf(stderr,
"Mismatch in exit value. "
"Should have been %d, was %d.\n",
value, kwsysProcess_GetExitValue(kp));
}
}
if (kwsysProcess_GetState(kp) != state) {
fprintf(stderr, "Mismatch in state. "
"Should have been %d, was %d.\n",
fprintf(stderr,
"Mismatch in state. "
"Should have been %d, was %d.\n",
state, kwsysProcess_GetState(kp));
result = 1;
}