From c3a2c81accae4d01a466a05e584ce5c35fcf69e6 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 31 Aug 2009 08:43:08 +0200 Subject: fixed segfault on 64 bit platforms --- Makefile.am | 2 +- configure.in | 1 - deadbeef.h | 4 ++-- plugins/lastfm/lastfm.c | 2 +- streamer.c | 2 +- threading.h | 4 ++-- threading_pthread.c | 4 ++-- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2b18197c..a268aa7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = gme/Game_Music_Emu-0.5.2 gme/Game_Music_Emu-0.5.2/gme sid/sidplay-libs-2.1.0 dumb pixmaps plugins/lastfm plugins/ape +SUBDIRS = gme/Game_Music_Emu-0.5.2 gme/Game_Music_Emu-0.5.2/gme sid/sidplay-libs-2.1.0 dumb pixmaps plugins/lastfm dumbpath=@top_srcdir@/dumb sidpath=@top_srcdir@/sid/sidplay-libs-2.1.0 diff --git a/configure.in b/configure.in index 554ec099..77d413a7 100644 --- a/configure.in +++ b/configure.in @@ -43,6 +43,5 @@ gme/Game_Music_Emu-0.5.2/gme/Makefile sid/sidplay-libs-2.1.0/Makefile dumb/Makefile plugins/lastfm/Makefile -plugins/ape/Makefile ]) diff --git a/deadbeef.h b/deadbeef.h index b9c8a7be..4059f346 100644 --- a/deadbeef.h +++ b/deadbeef.h @@ -126,8 +126,8 @@ typedef struct { const char *(*get_config_dir) (void); void (*quit) (void); // threading - int (*thread_start) (void (*fn)(uintptr_t ctx), uintptr_t ctx); - int (*thread_join) (int tid); + intptr_t (*thread_start) (void (*fn)(uintptr_t ctx), uintptr_t ctx); + int (*thread_join) (intptr_t tid); uintptr_t (*mutex_create) (void); void (*mutex_free) (uintptr_t mtx); int (*mutex_lock) (uintptr_t mtx); diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index f6fbf7e2..9d11e8b5 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -46,7 +46,7 @@ static char lfm_submission_url[256]; static uintptr_t lfm_mutex; static uintptr_t lfm_cond; static int lfm_stopthread; -static int lfm_tid; +static intptr_t lfm_tid; DB_plugin_t * lastfm_load (DB_functions_t *api) { diff --git a/streamer.c b/streamer.c index fd60922f..ae4b6daa 100644 --- a/streamer.c +++ b/streamer.c @@ -34,7 +34,7 @@ #include "plugins.h" #include "optmath.h" -static int streamer_tid; +static intptr_t streamer_tid; static SRC_STATE *src; static SRC_DATA srcdata; static int codecleft; diff --git a/threading.h b/threading.h index f899e73f..2e986b59 100644 --- a/threading.h +++ b/threading.h @@ -20,11 +20,11 @@ #include -int +intptr_t thread_start (void (*fn)(uintptr_t ctx), uintptr_t ctx); int -thread_join (int tid); +thread_join (intptr_t tid); uintptr_t mutex_create (void); void mutex_free (uintptr_t mtx); diff --git a/threading_pthread.c b/threading_pthread.c index 0934ab4a..942ddbfe 100644 --- a/threading_pthread.c +++ b/threading_pthread.c @@ -20,7 +20,7 @@ #include #include "threading.h" -int +intptr_t thread_start (void (*fn)(uintptr_t ctx), uintptr_t ctx) { pthread_t tid; pthread_attr_t attr; @@ -44,7 +44,7 @@ thread_start (void (*fn)(uintptr_t ctx), uintptr_t ctx) { } int -thread_join (int tid) { +thread_join (intptr_t tid) { void *retval; int s = pthread_join ((pthread_t)tid, &retval); if (s) { -- cgit v1.2.3