[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-devel] Clang compatibility fixes
- Date: Fri, 03 Aug 2012 15:35:06 +0200
- From: Florian Weimer <fweimer@xxxxxxxxxx>
- Subject: Re: [Condor-devel] Clang compatibility fixes
On 07/11/2012 10:51 AM, Florian Weimer wrote:
The attached patches are necessary to compile Condor with Clang. Only
patch 2 is clearly correct (variable-length arrays are a GCC extension).
Patch 1 could be Clang bug, but I don't think so. Patch 3 is odd
because the comment above the ThreadInfo class definition strongly
suggests that there should have been an operator== in the first place.
The ThreadInfo fix wasn't applied to the master branch. Here's a new
one, based on off-list discussion with Greg Thain.
This time, I compiled the patched sources with both Clang and GCC.
--
Florian Weimer / Red Hat Product Security Team
>From 1766da036a7b15d97f6a95143be6961a69b9c03a Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Fri, 3 Aug 2012 11:17:52 +0200
Subject: [PATCH] Remove superfluous explicit template instances
ThreadInfo is not fully defined at this point, so this is not the right
place. This change is required to build Condor with Clang.
---
src/condor_utils/condor_threads.cpp | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/src/condor_utils/condor_threads.cpp b/src/condor_utils/condor_threads.cpp
index f0a59da..293d5fb 100644
--- a/src/condor_utils/condor_threads.cpp
+++ b/src/condor_utils/condor_threads.cpp
@@ -231,13 +231,6 @@ pthread_cond_signal (pthread_cond_t *cv)
#include "threads_implementation.h"
-#ifndef WIN32
- // explicit template instantiation
- template class HashTable<ThreadInfo,WorkerThreadPtr_t>;
- template class HashTable<int,WorkerThreadPtr_t>;
- template class Queue<WorkerThreadPtr_t>;
-#endif
-
#ifdef WIN32
int ThreadImplementation::m_CurrentTid = 0;
#endif
--
1.7.7.6