Commit 1b2d1fd8 authored by alp@webkit.org's avatar alp@webkit.org
Browse files

2008-10-20 Alp Toker <alp@nuanti.com>

        Reviewed by Mark Rowe.

        Use pthread instead of GThread where possible in the GTK+ port. This
        fixes issues with global initialisation, particularly on GTK+/Win32
        where a late g_thread_init() will cause hangs.

        Fix the pthread conditionals in the FTP code to correctly define
        threadsafe *_r functions on Windows. Partly fixes the GTK+/Win32
        build.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 74aa2f28
2008-10-20 Alp Toker <alp@nuanti.com>
Reviewed by Mark Rowe.
Use pthread instead of GThread where possible in the GTK+ port. This
fixes issues with global initialisation, particularly on GTK+/Win32
where a late g_thread_init() will cause hangs.
* GNUmakefile.am:
* wtf/Platform.h:
* wtf/Threading.h:
* wtf/ThreadingGtk.cpp:
* wtf/ThreadingPthreads.cpp:
2008-10-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
......
......@@ -284,6 +284,7 @@ javascriptcore_sources += \
JavaScriptCore/wtf/ThreadSpecific.h \
JavaScriptCore/wtf/Threading.h \
JavaScriptCore/wtf/ThreadingGtk.cpp \
JavaScriptCore/wtf/ThreadingPthreads.cpp \
JavaScriptCore/wtf/UnusedParam.h \
JavaScriptCore/wtf/Vector.h \
JavaScriptCore/wtf/VectorTraits.h \
......
......@@ -275,6 +275,12 @@
#define WTF_USE_PTHREADS 1
#endif
#if PLATFORM(GTK)
#if HAVE(PTHREAD_H)
#define WTF_USE_PTHREADS 1
#endif
#endif
#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
#define HAVE_ACCESSIBILITY 1
#endif
......
......@@ -63,10 +63,6 @@
#include <wtf/Locker.h>
#include <wtf/Noncopyable.h>
#if PLATFORM(GTK)
#include <wtf/GOwnPtr.h>
#endif
#if PLATFORM(WIN_OS)
#include <windows.h>
#elif PLATFORM(DARWIN)
......@@ -81,9 +77,8 @@
#if USE(PTHREADS)
#include <pthread.h>
#endif
#if PLATFORM(GTK)
#elif PLATFORM(GTK)
#include <wtf/GOwnPtr.h>
typedef struct _GMutex GMutex;
typedef struct _GCond GCond;
#endif
......
......@@ -30,6 +30,8 @@
#include "config.h"
#include "Threading.h"
#if !USE(PTHREADS)
#include "HashMap.h"
#include "MainThread.h"
#include "MathExtras.h"
......@@ -223,3 +225,5 @@ void ThreadCondition::broadcast()
}
#endif // !USE(PTHREADS)
......@@ -29,6 +29,8 @@
#include "config.h"
#include "Threading.h"
#if USE(PTHREADS)
#include "HashMap.h"
#include "MainThread.h"
#include "MathExtras.h"
......@@ -262,3 +264,5 @@ void ThreadCondition::broadcast()
}
} // namespace WTF
#endif // USE(PTHREADS)
2008-10-20 Alp Toker <alp@nuanti.com>
Reviewed by Mark Rowe.
Fix the pthread conditionals in the FTP code to correctly define
threadsafe *_r functions on Windows. Partly fixes the GTK+/Win32
build.
* loader/FTPDirectoryDocument.cpp:
* loader/FTPDirectoryParser.cpp:
2008-10-20 David Hyatt <hyatt@apple.com>
 
https://bugs.webkit.org/show_bug.cgi?id=21751
......
......@@ -39,13 +39,11 @@
#include "SharedBuffer.h"
#include "Text.h"
// On Win, the threadsafe *_r functions need to be gotten from pthreads.
#if COMPILER(MSVC) && USE(PTHREADS)
#include <pthread.h>
#endif
#if PLATFORM(QT)
#include <QDateTime>
// On Windows, use the threadsafe *_r functions provided by pthread.
#elif PLATFORM(WIN_OS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
#include <pthread.h>
#endif
using namespace std;
......
......@@ -24,8 +24,10 @@
#if ENABLE(FTPDIR)
#include "FTPDirectoryParser.h"
// On Win, the threadsafe *_r functions need to be gotten from pthreads.
#if COMPILER(MSVC) && USE(PTHREADS)
#if PLATFORM(QT)
#include <QDateTime>
// On Windows, use the threadsafe *_r functions provided by pthread.
#elif PLATFORM(WIN_OS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
#include <pthread.h>
#endif
......@@ -34,10 +36,6 @@
using namespace WTF;
#if PLATFORM(QT)
#include <QDateTime>
#endif
namespace WebCore {
#if PLATFORM(QT) && defined(Q_WS_WIN32)
// Defined in FTPDirectoryDocument.cpp.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment