OSDN Git Service

Fix ReadWriteLock class problem. Will upstream this asap
authorAndrei Popescu <andreip@google.com>
Fri, 14 Aug 2009 14:52:56 +0000 (15:52 +0100)
committerAndrei Popescu <andreip@google.com>
Fri, 14 Aug 2009 14:52:56 +0000 (15:52 +0100)
JavaScriptCore/wtf/Platform.h
JavaScriptCore/wtf/Threading.h
JavaScriptCore/wtf/ThreadingPthreads.cpp
V8Binding/V8Binding.derived.mk
WebCore/config.h

index 3a7e2a0..845684e 100644 (file)
 #endif
 #define HAVE_READLINE 1
 #define HAVE_RUNLOOP_TIMER 1
+#define HAVE_PTHREAD_RWLOCK 1
 #endif
 
 #if PLATFORM(CHROMIUM) && PLATFORM(DARWIN)
 #define HAVE_SIGNAL_H 1
 #endif
 
-#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(SYMBIAN) && !COMPILER(RVCT)
+#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(SYMBIAN) && !COMPILER(RVCT) && !PLATFORM(ANDROID)
 #define HAVE_TM_GMTOFF 1
 #define HAVE_TM_ZONE 1
 #define HAVE_TIMEGM 1
index f892dcd..bbfe8b5 100644 (file)
@@ -130,10 +130,10 @@ void detachThread(ThreadIdentifier);
 
 #if USE(PTHREADS)
 typedef pthread_mutex_t PlatformMutex;
-#if PLATFORM(ANDROID)
-typedef void* PlatformReadWriteLock;
-#else
+#if HAVE(PTHREAD_RWLOCK)
 typedef pthread_rwlock_t PlatformReadWriteLock;
+#else
+typedef void* PlatformReadWriteLock;
 #endif
 typedef pthread_cond_t PlatformCondition;
 #elif PLATFORM(GTK)
index a321b40..ea09a1f 100644 (file)
@@ -268,6 +268,7 @@ void Mutex::unlock()
     ASSERT_UNUSED(result, !result);
 }
 
+#if HAVE(PTHREAD_RWLOCK)
 
 ReadWriteLock::ReadWriteLock()
 {
@@ -322,6 +323,7 @@ void ReadWriteLock::unlock()
     int result = pthread_rwlock_unlock(&m_readWriteLock);
     ASSERT_UNUSED(result, !result);
 }
+#endif  // HAVE(PTHREAD_RWLOCK)
 
 ThreadCondition::ThreadCondition()
 { 
index b639b8b..f3e83d4 100644 (file)
@@ -174,13 +174,7 @@ js_binding_scripts := \
        $(WEBCORE_PATH)/bindings/scripts/IDLStructure.pm \
        $(WEBCORE_PATH)/bindings/scripts/generate-bindings.pl
 
-FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 V8_BINDING ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_WORKERS=1
-
-ifeq ($(ENABLE_VIDEO), true)
-  FEATURE_DEFINES += ENaBLE_VIDEO=1
-else
-  FEATURE_DEFINES += ENABLE_VIDEO=0
-endif
+FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 V8_BINDING ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_WORKERS=1 ENABLE_VIDEO=1
 
 GEN := \
     $(intermediates)/bindings/V8CSSCharsetRule.h \
index 84fd08f..a9fa934 100644 (file)
 #define ENABLE_FTPDIR 0
 #ifndef ENABLE_SVG
 #define ENABLE_SVG 0
-#undef ENABLE_WORKERS
-#define ENABLE_WORKERS 1
 #undef ENABLE_V8_LOCKERS
 #define ENABLE_V8_LOCKERS 1
+#undef ENABLE_VIDEO
+#define ENABLE_VIDEO 1
+#undef ENABLE_WORKERS
+#define ENABLE_WORKERS 1
 #endif
 #if ENABLE_SVG
 #if !defined(ENABLE_SVG_ANIMATION)
 #define ENABLE_XPATH 0
 #define ENABLE_XSLT 0
 
-#ifndef ENABLE_VIDEO
-#define ENABLE_VIDEO 1
-#endif
-
 #undef ENABLE_ARCHIVE
 #define ENABLE_ARCHIVE 0 // ANDROID addition: allow web archive to be disabled
 #define ENABLE_OFFLINE_WEB_APPLICATIONS 1