Guard COMMIT and commit.h usage behind HAVE_COMMIT

This commit is contained in:
Ben Boeckel 2013-07-13 13:15:26 -04:00 committed by Paul Beckingham
parent 12809fd0bf
commit 6a9f6a9c82
2 changed files with 6 additions and 0 deletions

View file

@ -35,7 +35,9 @@
#include <i18n.h> #include <i18n.h>
#include <text.h> #include <text.h>
#include <util.h> #include <util.h>
#ifdef HAVE_COMMIT
#include <commit.h> #include <commit.h>
#endif
#ifdef HAVE_LIBGNUTLS #ifdef HAVE_LIBGNUTLS
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
@ -136,7 +138,9 @@ int CmdDiagnostics::execute (std::string& output)
// Build date. // Build date.
<< " " << STRING_CMD_DIAG_BUILT << ": " << __DATE__ << " " << __TIME__ << "\n" << " " << STRING_CMD_DIAG_BUILT << ": " << __DATE__ << " " << __TIME__ << "\n"
#ifdef HAVE_COMMIT
<< " " << STRING_CMD_DIAG_COMMIT << ": " << COMMIT << "\n" << " " << STRING_CMD_DIAG_COMMIT << ": " << COMMIT << "\n"
#endif
<< " CMake: " << CMAKE_VERSION << "\n" << " CMake: " << CMAKE_VERSION << "\n"
<< " " << STRING_CMD_DIAG_CAPS << ":" << " " << STRING_CMD_DIAG_CAPS << ":"
#ifdef HAVE_LIBPTHREAD #ifdef HAVE_LIBPTHREAD

View file

@ -30,7 +30,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <Context.h> #include <Context.h>
#include <ViewText.h> #include <ViewText.h>
#ifdef HAVE_COMMIT
#include <commit.h> #include <commit.h>
#endif
#include <CmdVersion.h> #include <CmdVersion.h>
#include <text.h> #include <text.h>
#include <i18n.h> #include <i18n.h>