Adjust #ifdef __clang__ to exclude clang versions > 6

This works only with Apple clang; the regular clang is at version 3, but
hasn't been tested for what versions emit what sort of function signatures
to logs.
This commit is contained in:
John Ralls 2014-12-21 12:55:07 -08:00
parent 745ff9e519
commit 02acf2b6f4
5 changed files with 12 additions and 12 deletions

View File

@ -462,7 +462,7 @@ test_gnc_account_list_name_violations (Fixture *fixture, gconstpointer pData)
{
guint log_level = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
gchar *log_domain = "gnc.engine";
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "GList *gnc_account_list_name_violations(QofBook *, const gchar *)"
#else
#define _func "gnc_account_list_name_violations"
@ -749,7 +749,7 @@ test_xaccCloneAccount (Fixture *fixture, gconstpointer pData)
Account *clone;
QofBook *book = gnc_account_get_book (fixture->acct);
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "Account *xaccCloneAccount(const Account *, QofBook *)"
#else
#define _func "xaccCloneAccount"
@ -852,7 +852,7 @@ test_xaccFreeAccount (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@ -966,7 +966,7 @@ test_xaccAccountCommitEdit (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@ -1083,7 +1083,7 @@ test_gnc_account_insert_remove_split (Fixture *fixture, gconstpointer pData)
Split *split3 = xaccMallocSplit (book);
TestSignal sig1, sig2, sig3;
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "gboolean gnc_account_insert_split(Account *, Split *)"
#else
#define _func "gnc_account_insert_split"

View File

@ -1269,7 +1269,7 @@ test_get_corr_account_split (Fixture *fixture, gconstpointer pData)
Account *acc1 = xaccMallocAccount (book);
Account *acc2 = xaccMallocAccount (book);
Account *acc3 = xaccMallocAccount (book);
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "gboolean get_corr_account_split(const Split *, const Split **)"
#else
#define _func "get_corr_account_split"

View File

@ -486,7 +486,7 @@ test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
QofBook *book = qof_book_new ();
TestSignal sig1 = test_signal_new (NULL, QOF_EVENT_CREATE,NULL);
Transaction *txn;
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "Transaction *xaccMallocTransaction(QofBook *)"
#else
#define _func "xaccMallocTransaction"
@ -1272,7 +1272,7 @@ xaccTransGetAccountBalance (const Transaction *trans,// C: 1 Local: 0:0:0
static void
test_xaccTransGetAccountBalance (Fixture *fixture, gconstpointer pData)
{
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "gnc_numeric xaccTransGetAccountBalance(const Transaction *, const Account *)"
#else
#define _func "xaccTransGetAccountBalance"

View File

@ -69,7 +69,7 @@ test_gnc_localtime (void)
// difference between g_date_time and tm->tm_wday)
};
guint ind;
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_localtime_r(const time64 *, struct tm *)"
#else
#define _func "gnc_localtime_r"
@ -140,7 +140,7 @@ test_gnc_gmtime (void)
#endif
};
guint ind;
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_gmtime(const time64 *)"
#else
#define _func "gnc_gmtime"
@ -1718,7 +1718,7 @@ test_gnc_timespec_to_iso8601_buff (void)
gchar *end;
gchar *logdomain = "qof";
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
#else
#define _func "gnc_timespec_to_iso8601_buff"

View File

@ -611,7 +611,7 @@ test_book_foreach_collection( Fixture *fixture, gconstpointer pData )
QofIdType my_type = "my_type", my_type2 = "my_type2";
guint param = (guint) g_test_rand_int();
/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
#ifdef __clang__
#if defined(__clang__) && __clang_major__ < 6
#define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
#else
#define _func "qof_book_foreach_collection"