summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about.txt3
-rw-r--r--configure.ac22
-rw-r--r--plugins/ffmpeg/ffmpeg.c40
-rw-r--r--plugins/flac/Makefile.am9
-rw-r--r--plugins/flac/flac.c106
-rw-r--r--plugins/gtkui/Makefile.am8
-rw-r--r--plugins/gtkui/ddblistview.c43
-rw-r--r--plugins/gtkui/deadbeef.glade4
-rw-r--r--plugins/gtkui/interface.c12
-rw-r--r--plugins/gtkui/search.c13
-rw-r--r--plugins/lastfm/lastfm.c4
-rw-r--r--plugins/liboggedit/Makefile.am4
-rw-r--r--plugins/liboggedit/oggedit_art.c2
-rw-r--r--plugins/liboggedit/oggedit_flac.c14
-rw-r--r--plugins/liboggedit/oggedit_internal.c11
-rw-r--r--plugins/liboggedit/oggedit_opus.c9
-rw-r--r--plugins/liboggedit/oggedit_utils.c10
-rw-r--r--plugins/liboggedit/oggedit_vorbis.c12
-rw-r--r--plugins/pltbrowser/pltbrowser.c48
-rwxr-xr-xscripts/static_build.sh1
-rw-r--r--tools/apbuild/apsymbols.h.x86_6455
-rwxr-xr-xtools/apbuild/buildlist4
22 files changed, 250 insertions, 184 deletions
diff --git a/about.txt b/about.txt
index 031c498b..1b7b6837 100644
--- a/about.txt
+++ b/about.txt
@@ -28,6 +28,7 @@ Contributors:
Christian Boxdörfer <christian.boxdoerfer@posteo.de>
David Bryant <david@wavpack.com>
Derreck <sarumyanxxl@users.sourceforge.net>
+ Ian Nartowicz
Igor Murzov <igor@gplsoft.org>
Igor Rudchenko <igor@thinkpads.net>
Jan D. Behrens <zykure@web.de>
@@ -46,7 +47,7 @@ Special Thanks To:
Jan Marguc
Olga Belozerova
- and to all the people and anonymous creatures hanging at deadbeef-ru@cjr and #deadbeef-player
+ and to all the people and anonymous creatures hanging at #deadbeef-player and #deadbeef-ru
Bundled libraries:
diff --git a/configure.ac b/configure.ac
index 2e388de4..76338d66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,7 +353,7 @@ dnl vorbis plugin
AS_IF([test "${enable_vorbis}" != "no"], [
AS_IF([test "${enable_staticlink}" != "no"], [
HAVE_VORBISPLUGIN=yes
- VORBIS_LIBS="../../$LIB/lib/libogg.a ../../$LIB/lib/libvorbis.a ../../$LIB/lib/libvorbisenc.a ../../$LIB/lib/libvorbisfile.a"
+ VORBIS_LIBS="-lvorbisfile -lvorbis -lm -logg"
VORBIS_CFLAGS="-I../../$LIB/include"
AC_SUBST(VORBIS_LIBS)
AC_SUBST(VORBIS_CFLAGS)
@@ -368,12 +368,29 @@ AS_IF([test "${enable_vorbis}" != "no"], [
])
])
+dnl libogg for oggedit
+AS_IF([test "${enable_staticlink}" != "no"], [
+ HAVE_OGG=yes
+ OGG_LIBS="-logg"
+ OGG_CFLAGS="-I../../$LIB/include"
+ AC_SUBST(OGG_LIBS)
+ AC_SUBST(OGG_CFLAGS)
+], [
+ AC_CHECK_LIB([ogg], [main], [HAVE_OGG=yes])
+ AS_IF([test "$HAVE_OGG" = "yes"], [
+ HAVE_VORBISPLUGIN=yes
+ OGG_LIBS="-logg"
+ AC_SUBST(OGG_LIBS)
+ ])
+])
+
+
dnl flac plugin
AS_IF([test "${enable_flac}" != "no"], [
AS_IF([test "${enable_staticlink}" != "no"], [
HAVE_FLACPLUGIN=yes
FLAC_CFLAGS="-I../../$LIB/include"
- FLAC_LIBS="../../$LIB/lib/libFLAC.a ../../$LIB/lib/libogg.a"
+ FLAC_LIBS="-lFLAC"
AC_SUBST(FLAC_CFLAGS)
AC_SUBST(FLAC_LIBS)
], [
@@ -734,6 +751,7 @@ PLUGINS_DIRS="plugins/liboggedit plugins/libmp4ff plugins/libparser plugins/last
AM_CONDITIONAL(APE_USE_YASM, test "x$APE_USE_YASM" = "xyes")
AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes")
+AM_CONDITIONAL(HAVE_OGG, test "x$HAVE_OGG" = "xyes")
AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes")
AM_CONDITIONAL(HAVE_WAVPACK, test "x$HAVE_WAVPACKPLUGIN" = "xyes")
AM_CONDITIONAL(HAVE_SNDFILE, test "x$HAVE_SNDFILEPLUGIN" = "xyes")
diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c
index aaf05464..34116437 100644
--- a/plugins/ffmpeg/ffmpeg.c
+++ b/plugins/ffmpeg/ffmpeg.c
@@ -553,11 +553,31 @@ ffmpeg_read_metadata_internal (DB_playItem_t *it, AVFormatContext *fctx) {
}
#else
// ffmpeg-0.11 new metadata format
- AVDictionary *md = fctx->metadata;
AVDictionaryEntry *t = NULL;
int m;
- if (md) {
+ for (int i = 0; i < fctx->nb_streams + 1; i++) {
+ AVDictionary *md = i == 0 ? fctx->metadata : fctx->streams[i-1]->metadata;
+ if (!md) {
+ continue;
+ }
while (t = av_dict_get (md, "", t, AV_DICT_IGNORE_SUFFIX)) {
+ if (!strcasecmp (t->key, "replaygain_album_gain")) {
+ deadbeef->pl_set_item_replaygain (it, DDB_REPLAYGAIN_ALBUMGAIN, atof (t->value));
+ continue;
+ }
+ else if (!strcasecmp (t->key, "replaygain_album_peak")) {
+ deadbeef->pl_set_item_replaygain (it, DDB_REPLAYGAIN_ALBUMPEAK, atof (t->value));
+ continue;
+ }
+ else if (!strcasecmp (t->key, "replaygain_track_gain")) {
+ deadbeef->pl_set_item_replaygain (it, DDB_REPLAYGAIN_TRACKGAIN, atof (t->value));
+ continue;
+ }
+ else if (!strcasecmp (t->key, "replaygain_track_peak")) {
+ deadbeef->pl_set_item_replaygain (it, DDB_REPLAYGAIN_TRACKPEAK, atof (t->value));
+ continue;
+ }
+
for (m = 0; map[m]; m += 2) {
if (!strcasecmp (t->key, map[m])) {
deadbeef->pl_append_meta (it, map[m+1], t->value);
@@ -569,22 +589,6 @@ ffmpeg_read_metadata_internal (DB_playItem_t *it, AVFormatContext *fctx) {
}
}
}
- else {
- for (int i = 0; i < fctx->nb_streams; i++) {
- md = fctx->streams[i]->metadata;
- while (t = av_dict_get (md, "", t, AV_DICT_IGNORE_SUFFIX)) {
- for (m = 0; map[m]; m += 2) {
- if (!strcasecmp (t->key, map[m])) {
- deadbeef->pl_append_meta (it, map[m+1], t->value);
- break;
- }
- }
- if (!map[m]) {
- deadbeef->pl_append_meta (it, t->key, t->value);
- }
- }
- }
- }
#endif
#endif
return 0;
diff --git a/plugins/flac/Makefile.am b/plugins/flac/Makefile.am
index c87ca53d..c8e82765 100644
--- a/plugins/flac/Makefile.am
+++ b/plugins/flac/Makefile.am
@@ -4,6 +4,11 @@ pkglib_LTLIBRARIES = flac.la
flac_la_SOURCES = flac.c
flac_la_LDFLAGS = -module -avoid-version -export-symbols-regex flac_load
-flac_la_LIBADD = $(LDADD) $(FLAC_LIBS) ../liboggedit/liboggedit.a
-AM_CFLAGS = $(CFLAGS) $(FLAC_CFLAGS) -std=c99
+if HAVE_OGG
+oggedit_def = -DUSE_OGGEDIT=1
+oggedit_lib = ../liboggedit/liboggedit.a $(OGG_LIBS)
+endif
+
+flac_la_LIBADD = $(LDADD) $(FLAC_LIBS) $(oggedit_lib)
+AM_CFLAGS = $(CFLAGS) $(FLAC_CFLAGS) $(oggedit_def) -std=c99
endif
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c
index 016a3c6a..50e82739 100644
--- a/plugins/flac/flac.c
+++ b/plugins/flac/flac.c
@@ -30,6 +30,9 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -37,16 +40,19 @@
#include <math.h>
#include <FLAC/stream_decoder.h>
#include <FLAC/metadata.h>
+#if HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
#include "../../deadbeef.h"
#include "../artwork/artwork.h"
#include "../liboggedit/oggedit.h"
-static DB_decoder_t plugin;
-static DB_functions_t *deadbeef;
+ static DB_decoder_t plugin;
+ static DB_functions_t *deadbeef;
-static DB_artwork_plugin_t *coverart_plugin = NULL;
+ static DB_artwork_plugin_t *coverart_plugin = NULL;
-//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
+ //#define trace(...) { fprintf(stderr, __VA_ARGS__); }
#define trace(fmt,...)
#define min(x,y) ((x)<(y)?(x):(y))
@@ -54,55 +60,55 @@ static DB_artwork_plugin_t *coverart_plugin = NULL;
#define BUFFERSIZE 100000
-typedef struct {
- DB_fileinfo_t info;
- FLAC__StreamDecoder *decoder;
- char *buffer; // this buffer always has float samples
- int remaining; // bytes remaining in buffer from last read
- int64_t startsample;
- int64_t endsample;
- int64_t currentsample;
- int64_t totalsamples;
- int flac_critical_error;
- int init_stop_decoding;
- int tagsize;
- DB_FILE *file;
-
- // used only on insert
- ddb_playlist_t *plt;
- DB_playItem_t *after;
- DB_playItem_t *last;
- DB_playItem_t *it;
- const char *fname;
- int bitrate;
- FLAC__StreamMetadata *flac_cue_sheet;
-} flac_info_t;
-
-// callbacks
-FLAC__StreamDecoderReadStatus flac_read_cb (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) {
- flac_info_t *info = (flac_info_t *)client_data;
- size_t r = deadbeef->fread (buffer, 1, *bytes, info->file);
- *bytes = r;
- if (r == 0) {
- return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ typedef struct {
+ DB_fileinfo_t info;
+ FLAC__StreamDecoder *decoder;
+ char *buffer; // this buffer always has float samples
+ int remaining; // bytes remaining in buffer from last read
+ int64_t startsample;
+ int64_t endsample;
+ int64_t currentsample;
+ int64_t totalsamples;
+ int flac_critical_error;
+ int init_stop_decoding;
+ int tagsize;
+ DB_FILE *file;
+
+ // used only on insert
+ ddb_playlist_t *plt;
+ DB_playItem_t *after;
+ DB_playItem_t *last;
+ DB_playItem_t *it;
+ const char *fname;
+ int bitrate;
+ FLAC__StreamMetadata *flac_cue_sheet;
+ } flac_info_t;
+
+ // callbacks
+ FLAC__StreamDecoderReadStatus flac_read_cb (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) {
+ flac_info_t *info = (flac_info_t *)client_data;
+ size_t r = deadbeef->fread (buffer, 1, *bytes, info->file);
+ *bytes = r;
+ if (r == 0) {
+ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ }
+ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
}
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-}
FLAC__StreamDecoderSeekStatus flac_seek_cb (const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) {
flac_info_t *info = (flac_info_t *)client_data;
int r = deadbeef->fseek (info->file, absolute_byte_offset, SEEK_SET);
if (r) {
- return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
}
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
}
FLAC__StreamDecoderTellStatus flac_tell_cb (const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) {
flac_info_t *info = (flac_info_t *)client_data;
size_t r = deadbeef->ftell (info->file);
*absolute_byte_offset = r;
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ return FLAC__STREAM_DECODER_TELL_STATUS_OK;
}
FLAC__StreamDecoderLengthStatus flac_lenght_cb (const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data) {
@@ -111,7 +117,7 @@ FLAC__StreamDecoderLengthStatus flac_lenght_cb (const FLAC__StreamDecoder *decod
deadbeef->fseek (info->file, 0, SEEK_END);
*stream_length = deadbeef->ftell (info->file);
deadbeef->fseek (info->file, pos, SEEK_SET);
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
}
FLAC__bool flac_eof_cb (const FLAC__StreamDecoder *decoder, void *client_data) {
@@ -546,7 +552,7 @@ static const char *metainfo[] = {
};
static void
-cflac_add_metadata (DB_playItem_t *it, char *s, int length) {
+cflac_add_metadata (DB_playItem_t *it, const char *s, int length) {
int m;
for (m = 0; metainfo[m]; m += 2) {
int l = strlen (metainfo[m]);
@@ -612,7 +618,7 @@ cflac_init_metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__Str
for (int i = 0; i < vc->num_comments; i++) {
const FLAC__StreamMetadata_VorbisComment_Entry *c = &vc->comments[i];
if (c->length > 0) {
- char *s = c->entry;
+ const char *s = (const char *)c->entry;
cflac_add_metadata (it, s, c->length);
}
}
@@ -826,7 +832,7 @@ cflac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
else {
const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet");
if (cuesheet) {
- DB_playItem_t *last = deadbeef->plt_insert_cue_from_buffer (plt, after, it, cuesheet, strlen (cuesheet), info.totalsamples, info.info.fmt.samplerate);
+ DB_playItem_t *last = deadbeef->plt_insert_cue_from_buffer (plt, after, it, (const uint8_t *)cuesheet, strlen (cuesheet), info.totalsamples, info.info.fmt.samplerate);
if (last) {
cflac_free_temp (_info);
deadbeef->pl_item_unref (it);
@@ -896,7 +902,7 @@ cflac_read_metadata (DB_playItem_t *it) {
for (int i = 0; i < vc->num_comments; i++) {
const FLAC__StreamMetadata_VorbisComment_Entry *c = &vc->comments[i];
if (c->length > 0) {
- char *s = c->entry;
+ const char *s = (const char *)c->entry;
cflac_add_metadata (it, s, c->length);
}
}
@@ -938,7 +944,7 @@ cflac_write_metadata_ogg (DB_playItem_t *it, FLAC__StreamMetadata_VorbisComment
size_t num_tags = vc->num_comments;
char **tags = calloc(num_tags+1, sizeof(char **));
for (size_t i = 0; i < num_tags; i++)
- tags[i] = vc->comments[i].entry;
+ tags[i] = (char *)vc->comments[i].entry;
const off_t file_size = oggedit_write_flac_metadata (deadbeef->fopen(fname), fname, 0, num_tags, tags);
if (file_size <= 0) {
trace ("cflac_write_metadata_ogg: oggedit_write_flac_metadata failed: code %d\n", file_size);
@@ -999,10 +1005,10 @@ cflac_write_metadata (DB_playItem_t *it) {
for (int i = 0; i < vc_comments; i++) {
const FLAC__StreamMetadata_VorbisComment_Entry *c = &vc->comments[i];
if (c->length > 0) {
- if (strncasecmp (c->entry, "replaygain_album_gain=", 22)
- && strncasecmp (c->entry, "replaygain_album_peak=", 22)
- && strncasecmp (c->entry, "replaygain_track_gain=", 22)
- && strncasecmp (c->entry, "replaygain_track_peak=", 22)) {
+ if (strncasecmp ((const char *)c->entry, "replaygain_album_gain=", 22)
+ && strncasecmp ((const char *)c->entry, "replaygain_album_peak=", 22)
+ && strncasecmp ((const char *)c->entry, "replaygain_track_gain=", 22)
+ && strncasecmp ((const char *)c->entry, "replaygain_track_peak=", 22)) {
FLAC__metadata_object_vorbiscomment_delete_comment (data, i);
vc_comments--;
i--;
diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am
index d7f6fcc9..8495bd55 100644
--- a/plugins/gtkui/Makefile.am
+++ b/plugins/gtkui/Makefile.am
@@ -13,9 +13,9 @@ gtkuidir = $(libdir)/$(PACKAGE)
#endif
#endif
-#if OS_OSX
-#OSXSRC = retina.m
-#endif
+if OS_OSX
+osx_sources = retina.m
+endif
GTKUI_SOURCES = gtkui.c gtkui.h\
callbacks.c interface.c support.c callbacks.h interface.h support.h\
@@ -161,7 +161,7 @@ ddb_gui_GTK2_la_CFLAGS = -std=c99 $(GTK2_DEPS_CFLAGS) $(SM_CFLAGS) $(GTKGLEXT_CF
endif
if HAVE_GTK3
-GTKUI_SOURCES_GTK3 = $(GTKUI_SOURCES)
+GTKUI_SOURCES_GTK3 = $(GTKUI_SOURCES) $(osx_sources)
# gtkglext-gtk3/gtk/gtkglinit.c\
# gtkglext-gtk3/gtk/gtkglversion.c\
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c
index e5e5d584..2234643d 100644
--- a/plugins/gtkui/ddblistview.c
+++ b/plugins/gtkui/ddblistview.c
@@ -204,6 +204,9 @@ ddb_listview_list_button_press_event (GtkWidget *widget,
gpointer user_data);
gboolean
+ddb_listview_list_popup_menu (GtkWidget *widget, gpointer user_data);
+
+gboolean
ddb_listview_list_drag_motion (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
@@ -446,6 +449,9 @@ ddb_listview_init(DdbListview *listview)
g_signal_connect_after ((gpointer) listview->list, "button_press_event",
G_CALLBACK (ddb_listview_list_button_press_event),
NULL);
+ g_signal_connect ((gpointer) listview->list, "popup_menu",
+ G_CALLBACK (ddb_listview_list_popup_menu),
+ NULL);
g_signal_connect ((gpointer) listview->list, "scroll_event",
G_CALLBACK (ddb_listview_vscroll_event),
NULL);
@@ -2073,20 +2079,6 @@ ddb_listview_handle_keypress (DdbListview *ps, int keyval, int state) {
cursor = 0;
gtk_range_set_value (GTK_RANGE (range), gtk_adjustment_get_lower (adj));
}
- else if (keyval == GDK_Menu) {
- DdbListviewIter it = ps->binding->head ();
- while (it && !ps->binding->is_selected (it)) {
- DdbListviewIter next = ps->binding->next (it);
- ps->binding->unref (it);
- it = next;
- }
- if (it) {
- int sel = ps->binding->get_idx (it);
- ps->binding->list_context_menu (ps, it, sel);
- ps->binding->unref (it);
- }
- return TRUE;
- }
else {
return FALSE;
}
@@ -2154,6 +2146,23 @@ ddb_listview_handle_keypress (DdbListview *ps, int keyval, int state) {
return TRUE;
}
+gboolean
+ddb_listview_list_popup_menu (GtkWidget *widget, gpointer user_data) {
+ DdbListview *ps = DDB_LISTVIEW (g_object_get_data (G_OBJECT (widget), "owner"));
+ DdbListviewIter it = ps->binding->head ();
+ while (it && !ps->binding->is_selected (it)) {
+ DdbListviewIter next = ps->binding->next (it);
+ ps->binding->unref (it);
+ it = next;
+ }
+ if (it) {
+ int sel = ps->binding->get_idx (it);
+ ps->binding->list_context_menu (ps, it, sel);
+ ps->binding->unref (it);
+ }
+ return TRUE;
+}
+
int
ddb_listview_dragdrop_get_row_from_coord (DdbListview *listview, int y) {
if (y == -1) {
@@ -3335,7 +3344,9 @@ ddb_listview_clear_sort (DdbListview *listview) {
gboolean
ddb_listview_list_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
DdbListview *listview = DDB_LISTVIEW (g_object_get_data (G_OBJECT (widget), "owner"));
- return ddb_listview_handle_keypress (listview, event->keyval, event->state);
-
+ if (!ddb_listview_handle_keypress (listview, event->keyval, event->state)) {
+ return on_mainwin_key_press_event (widget, event, user_data);
+ }
+ return TRUE;
}
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index c2082b28..967b97b3 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -22,7 +22,7 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
- <signal name="key_press_event" handler="on_mainwin_key_press_event" last_modification_time="Thu, 30 Jul 2009 21:14:26 GMT"/>
+ <signal name="key_press_event" handler="on_mainwin_key_press_event" after="yes" last_modification_time="Thu, 30 Jul 2009 21:14:26 GMT"/>
<signal name="delete_event" handler="on_mainwin_delete_event" last_modification_time="Thu, 13 Aug 2009 20:35:55 GMT"/>
<signal name="configure_event" handler="on_mainwin_configure_event" last_modification_time="Sun, 23 Aug 2009 15:26:53 GMT"/>
<signal name="window_state_event" handler="on_mainwin_window_state_event" last_modification_time="Wed, 09 Dec 2009 19:39:55 GMT"/>
@@ -781,7 +781,7 @@
<signal name="delete_event" handler="gtk_widget_hide_on_delete" last_modification_time="Sat, 08 Aug 2009 23:03:33 GMT"/>
<signal name="configure_event" handler="on_searchwin_configure_event" last_modification_time="Mon, 28 Dec 2009 19:24:44 GMT"/>
<signal name="window_state_event" handler="on_searchwin_window_state_event" last_modification_time="Mon, 28 Dec 2009 19:26:50 GMT"/>
- <signal name="key_press_event" handler="on_searchwin_key_press_event" after="yes" last_modification_time="Mon, 21 Oct 2013 21:53:35 GMT"/>
+ <signal name="key_press_event" handler="on_searchwin_key_press_event" last_modification_time="Mon, 21 Oct 2013 21:53:35 GMT"/>
<child>
<widget class="GtkVBox" id="vbox4">
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 49f4434d..d75ff742 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -461,9 +461,9 @@ create_mainwin (void)
gtk_widget_show (statusbar);
gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0);
- g_signal_connect ((gpointer) mainwin, "key_press_event",
- G_CALLBACK (on_mainwin_key_press_event),
- NULL);
+ g_signal_connect_after ((gpointer) mainwin, "key_press_event",
+ G_CALLBACK (on_mainwin_key_press_event),
+ NULL);
g_signal_connect ((gpointer) mainwin, "delete_event",
G_CALLBACK (on_mainwin_delete_event),
NULL);
@@ -739,9 +739,9 @@ create_searchwin (void)
g_signal_connect ((gpointer) searchwin, "window_state_event",
G_CALLBACK (on_searchwin_window_state_event),
NULL);
- g_signal_connect_after ((gpointer) searchwin, "key_press_event",
- G_CALLBACK (on_searchwin_key_press_event),
- NULL);
+ g_signal_connect ((gpointer) searchwin, "key_press_event",
+ G_CALLBACK (on_searchwin_key_press_event),
+ NULL);
g_signal_connect ((gpointer) searchentry, "changed",
G_CALLBACK (on_searchentry_changed),
NULL);
diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c
index ed0d69e6..d6c9aed0 100644
--- a/plugins/gtkui/search.c
+++ b/plugins/gtkui/search.c
@@ -189,18 +189,14 @@ on_searchwin_key_press_event (GtkWidget *widget,
{
// that's for when user attempts to navigate list while entry has focus
if (event->keyval == GDK_Escape) {
- gtk_widget_hide (widget);
+ gtk_widget_hide (searchwin);
+ return TRUE;
}
else if (event->keyval == GDK_Return) {
on_searchentry_activate (NULL, 0);
+ return TRUE;
}
- else if (event->keyval != GDK_Delete && event->keyval != GDK_Home && event->keyval != GDK_End){
- GtkWidget *pl = lookup_widget (searchwin, "searchlist");
- if (!ddb_listview_handle_keypress (DDB_LISTVIEW (pl), event->keyval, event->state)) {
- return on_mainwin_key_press_event (widget, event, user_data);
- }
- }
- return TRUE;
+ return FALSE;
}
gboolean
@@ -411,6 +407,7 @@ DdbListviewBinding search_binding = {
void
search_playlist_init (GtkWidget *widget) {
DdbListview *listview = DDB_LISTVIEW(widget);
+ g_signal_connect ((gpointer)listview->list, "key_press_event", G_CALLBACK (on_searchwin_key_press_event), listview);
search_binding.ref = (void (*) (DdbListviewIter))deadbeef->pl_item_ref;
search_binding.unref = (void (*) (DdbListviewIter))deadbeef->pl_item_unref;
search_binding.is_selected = (int (*) (DdbListviewIter))deadbeef->pl_is_selected;
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index d7e0a7e1..4d112acf 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
+#include <math.h>
#include "../../deadbeef.h"
//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
@@ -356,6 +357,9 @@ lfm_fetch_song_info (DB_playItem_t *song, float playtime, char *a, char *t, char
if (*l <= 0) {
*l = playtime;
}
+ if (*l < 30 && deadbeef->conf_get_int ("lastfm.submit_tiny_tracks", 0)) {
+ *l = 30;
+ }
if (!deadbeef->pl_get_meta (song, "track", n, META_FIELD_SIZE)) {
*n = 0;
}
diff --git a/plugins/liboggedit/Makefile.am b/plugins/liboggedit/Makefile.am
index 2134718f..651f9f44 100644
--- a/plugins/liboggedit/Makefile.am
+++ b/plugins/liboggedit/Makefile.am
@@ -1,6 +1,6 @@
-if HAVE_VORBIS
+if HAVE_OGG
noinst_LIBRARIES = liboggedit.a
liboggedit_a_SOURCES = oggedit_internal.h oggedit.h \
oggedit_internal.c oggedit_utils.c oggedit_art.c oggedit_opus.c oggedit_vorbis.c oggedit_flac.c
-AM_CFLAGS = $(VORBIS_CFLAGS) -fPIC -std=c99
+AM_CFLAGS = $(OGG_CFLAGS) -fPIC -std=c99
endif
diff --git a/plugins/liboggedit/oggedit_art.c b/plugins/liboggedit/oggedit_art.c
index 44e1c015..83e1c193 100644
--- a/plugins/liboggedit/oggedit_art.c
+++ b/plugins/liboggedit/oggedit_art.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <stdbool.h>
#include <ogg/ogg.h>
-#include <deadbeef/deadbeef.h>
+#include "../../deadbeef.h"
#include "oggedit_internal.h"
#include "oggedit.h"
diff --git a/plugins/liboggedit/oggedit_flac.c b/plugins/liboggedit/oggedit_flac.c
index 6eec6ac9..fd3a71a6 100644
--- a/plugins/liboggedit/oggedit_flac.c
+++ b/plugins/liboggedit/oggedit_flac.c
@@ -32,7 +32,10 @@
#include <unistd.h>
#include <stdbool.h>
#include <ogg/ogg.h>
-#include <deadbeef/deadbeef.h>
+#if HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
+#include "../../deadbeef.h"
#include "oggedit_internal.h"
#include "oggedit.h"
@@ -86,7 +89,7 @@ static ogg_packet **metadata_block_packets(DB_FILE *in, ogg_sync_state *oy, cons
if (!headers)
*res = OGGEDIT_ALLOCATION_FAILURE;
- else if (!packets || headers[0]->packet[0] & 0x3F != VCTYPE)
+ else if (!packets || (headers[0]->packet[0] & 0x3F) != VCTYPE)
*res = OGGEDIT_CANNOT_PARSE_HEADERS;
else
*res = pages;
@@ -158,9 +161,12 @@ off_t oggedit_write_flac_metadata(DB_FILE *in, const char *fname, const off_t of
const off_t stream_size_k = in->vfs->getlength(in) / 1000; // use file size for now
const size_t metadata_size = 4 + vc_size(vendor, num_tags, tags);
ptrdiff_t padding = headers[0]->bytes - metadata_size;
- if (stream_size_k < 1000 || padding < 0 || headers[1] && padding > 0 || padding > stream_size_k+metadata_size)
- if (res = open_temp_file(fname, tempname, &out))
+ if (stream_size_k < 1000 || padding < 0 || (headers[1] && padding > 0) || padding > stream_size_k+metadata_size) {
+ res = open_temp_file(fname, tempname, &out);
+ if (res) {
goto cleanup;
+ }
+ }
/* Re-pad if writing the whole file */
if (*tempname) {
diff --git a/plugins/liboggedit/oggedit_internal.c b/plugins/liboggedit/oggedit_internal.c
index a95fa1f8..f12e8d6d 100644
--- a/plugins/liboggedit/oggedit_internal.c
+++ b/plugins/liboggedit/oggedit_internal.c
@@ -36,7 +36,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <ogg/ogg.h>
-#include <deadbeef/deadbeef.h>
+#if HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
+#include "../../deadbeef.h"
#include "oggedit.h"
#include "oggedit_internal.h"
@@ -276,7 +279,7 @@ int copy_up_to_header(DB_FILE *in, FILE *out, ogg_sync_state *oy, ogg_page *og,
long flush_stream(FILE *out, ogg_stream_state *os)
{
ogg_page og;
- while (ogg_stream_flush_fill(os, &og, MAXPAYLOAD))
+ while (ogg_stream_flush(os, &og))
if (!write_page(out, &og))
return OGGEDIT_WRITE_ERROR;
const long pageno = ogg_stream_check(os) ? OGGEDIT_FLUSH_FAILED : ogg_page_pageno(&og);
@@ -433,8 +436,10 @@ ogg_packet *fill_vc_packet(const char *magic, const size_t magic_length, const c
if (op) {
memset(op, '\0', sizeof(*op));
op->bytes = oggpack_bytes(&opb);
- if (op->packet = malloc(op->bytes))
+ op->packet = malloc(op->bytes);
+ if (op->packet) {
memcpy(op->packet, oggpack_get_buffer(&opb), op->bytes);
+ }
}
oggpack_writeclear(&opb);
diff --git a/plugins/liboggedit/oggedit_opus.c b/plugins/liboggedit/oggedit_opus.c
index cb52480d..5d167094 100644
--- a/plugins/liboggedit/oggedit_opus.c
+++ b/plugins/liboggedit/oggedit_opus.c
@@ -33,7 +33,7 @@
#include <stdbool.h>
#include <limits.h>
#include <ogg/ogg.h>
-#include <deadbeef/deadbeef.h>
+#include "../../deadbeef.h"
#include "oggedit_internal.h"
#include "oggedit.h"
@@ -141,9 +141,12 @@ off_t oggedit_write_opus_metadata(DB_FILE *in, const char *fname, const off_t of
ptrdiff_t padding = tags_packet_size - metadata_size;
const off_t file_size_k = in->vfs->getlength(in) / 1000;
const size_t stream_size_k = stream_size ? stream_size / 1000 : file_size_k;
- if (file_size_k < 100 || padding < 0 || padding > file_size_k/10+stream_size_k+metadata_size)
- if (res = open_temp_file(fname, tempname, &out))
+ if (file_size_k < 100 || padding < 0 || padding > file_size_k/10+stream_size_k+metadata_size) {
+ res = open_temp_file(fname, tempname, &out);
+ if (res) {
goto cleanup;
+ }
+ }
/* Re-pad if writing the whole file */
if (*tempname)
diff --git a/plugins/liboggedit/oggedit_utils.c b/plugins/liboggedit/oggedit_utils.c
index 03e753a8..2d40e275 100644
--- a/plugins/liboggedit/oggedit_utils.c
+++ b/plugins/liboggedit/oggedit_utils.c
@@ -41,15 +41,15 @@ uint8_t *oggedit_vorbis_channel_map(const int channel_count)
return NULL;
switch(channel_count) {
case 3:
- return memcpy(map, &(uint8_t[]){0,2,1}, map_size);
+ return memcpy(map, &((uint8_t[]){0,2,1}), map_size);
case 5:
- return memcpy(map, &(uint8_t[]){0,2,1,3,4}, map_size);
+ return memcpy(map, &((uint8_t[]){0,2,1,3,4}), map_size);
case 6:
- return memcpy(map, &(uint8_t[]){0,2,1,4,5,3}, map_size);
+ return memcpy(map, &((uint8_t[]){0,2,1,4,5,3}), map_size);
case 7:
- return memcpy(map, &(uint8_t[]){0,2,1,4,5,6,3}, map_size);
+ return memcpy(map, &((uint8_t[]){0,2,1,4,5,6,3}), map_size);
case 8:
- return memcpy(map, &(uint8_t[]){0,2,1,6,7,4,5,3}, map_size);
+ return memcpy(map, &((uint8_t[]){0,2,1,6,7,4,5,3}), map_size);
default:
free(map);
return NULL;
diff --git a/plugins/liboggedit/oggedit_vorbis.c b/plugins/liboggedit/oggedit_vorbis.c
index 2ff3fc09..499c88b0 100644
--- a/plugins/liboggedit/oggedit_vorbis.c
+++ b/plugins/liboggedit/oggedit_vorbis.c
@@ -32,7 +32,10 @@
#include <unistd.h>
#include <stdbool.h>
#include <ogg/ogg.h>
-#include <deadbeef/deadbeef.h>
+#if HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
+#include "../../deadbeef.h"
#include "oggedit_internal.h"
#include "oggedit.h"
@@ -124,9 +127,12 @@ off_t oggedit_write_vorbis_metadata(DB_FILE *in, const char *fname, const off_t
ptrdiff_t padding = tags_packet_size - metadata_size;
const off_t file_size_k = in->vfs->getlength(in) / 1000;
const size_t stream_size_k = stream_size ? stream_size / 1000 : file_size_k;
- if (file_size_k < 100 || padding < 0 || padding > file_size_k/10+stream_size_k+metadata_size)
- if (res = open_temp_file(fname, tempname, &out))
+ if (file_size_k < 100 || padding < 0 || padding > file_size_k/10+stream_size_k+metadata_size) {
+ res = open_temp_file (fname, tempname, &out);
+ if (res) {
goto cleanup;
+ }
+ }
/* Re-pad if writing the whole file */
if (*tempname)
diff --git a/plugins/pltbrowser/pltbrowser.c b/plugins/pltbrowser/pltbrowser.c
index b003ecda..cc21bc00 100644
--- a/plugins/pltbrowser/pltbrowser.c
+++ b/plugins/pltbrowser/pltbrowser.c
@@ -79,6 +79,9 @@ on_pltbrowser_cursor_changed (GtkTreeView *treeview, gpointer user_data) {
}
}
+gboolean
+on_pltbrowser_popup_menu (GtkWidget *widget, gpointer user_data);
+
static gboolean
fill_pltbrowser_cb (gpointer data) {
w_pltbrowser_t *w = data;
@@ -109,6 +112,7 @@ fill_pltbrowser_cb (gpointer data) {
deadbeef->pl_unlock ();
w->ri_id = g_signal_connect ((gpointer)store, "row_inserted", G_CALLBACK (on_pltbrowser_row_inserted), w);
w->cc_id = g_signal_connect ((gpointer)w->tree, "cursor_changed", G_CALLBACK (on_pltbrowser_cursor_changed), w);
+ g_signal_connect ((gpointer) w->tree, "popup_menu", G_CALLBACK (on_pltbrowser_popup_menu), NULL);
return FALSE;
}
@@ -137,29 +141,35 @@ on_pltbrowser_button_press_event (GtkWidget *widget,
return FALSE;
}
if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
- GtkTreePath *path;
- GtkTreeViewColumn *col;
- gtk_tree_view_get_cursor (GTK_TREE_VIEW(widget), &path, &col);
- if (!path || !col) {
- // reset
- return FALSE;
- }
- int *indices = gtk_tree_path_get_indices (path);
- int plt_idx;
- if (indices) {
- plt_idx = indices[0];
- g_free (indices);
- }
- else {
- return FALSE;
- }
-
- GtkWidget *menu = gtkui_plugin->create_pltmenu (plt_idx);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, widget, event->button, gtk_get_current_event_time());
+ return on_pltbrowser_popup_menu (widget, user_data);
}
return FALSE;
}
+gboolean
+on_pltbrowser_popup_menu (GtkWidget *widget, gpointer user_data) {
+ GtkTreePath *path;
+ GtkTreeViewColumn *col;
+ gtk_tree_view_get_cursor (GTK_TREE_VIEW(widget), &path, &col);
+ if (!path || !col) {
+ // reset
+ return FALSE;
+ }
+ int *indices = gtk_tree_path_get_indices (path);
+ int plt_idx;
+ if (indices) {
+ plt_idx = indices[0];
+ g_free (indices);
+ }
+ else {
+ return FALSE;
+ }
+
+ GtkWidget *menu = gtkui_plugin->create_pltmenu (plt_idx);
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, widget, 0, gtk_get_current_event_time());
+ return TRUE;
+}
+
static void
on_pltbrowser_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) {
deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, 0, 0);
diff --git a/scripts/static_build.sh b/scripts/static_build.sh
index 5bcdf2a5..0ca35b47 100755
--- a/scripts/static_build.sh
+++ b/scripts/static_build.sh
@@ -36,6 +36,7 @@ export APBUILD_STATIC_LIBGCC=1
export APBUILD_CXX1=1
export CC=$AP/apgcc
export CXX=$AP/apgcc
+export OBJC=$AP/apgcc
./autogen.sh || exit -1
diff --git a/tools/apbuild/apsymbols.h.x86_64 b/tools/apbuild/apsymbols.h.x86_64
index 3ab2c8c4..9d34240b 100644
--- a/tools/apbuild/apsymbols.h.x86_64
+++ b/tools/apbuild/apsymbols.h.x86_64
@@ -6,11 +6,6 @@ APBUILD_NOTE_METADATA("apbuild.version=" APBUILD_VERSION);
#endif
/* apbuild generated symbol exclusion list */
-__asm__(".symver __exp_finite,exp@GLIBC_2.2.5");
-__asm__(".symver __acosf_finite,acosf@GLIBC_2.2.5");
-__asm__(".symver __log_finite,log@GLIBC_2.2.5");
-__asm__(".symver __pow_finite,pow@GLIBC_2.2.5");
-__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
__asm__(".symver clnt_pcreateerror,clnt_pcreateerror@GLIBC_2.2.5");
__asm__(".symver clnt_spcreateerror,clnt_spcreateerror@GLIBC_2.2.5");
__asm__(".symver feupdateenv,feupdateenv@GLIBC_2.2.5");
@@ -20,6 +15,7 @@ __asm__(".symver mkostemps,mkostemps@GLIBC_2.11");
__asm__(".symver mkostemps64,mkostemps64@GLIBC_2.11");
__asm__(".symver nftw,nftw@GLIBC_2.2.5");
__asm__(".symver nftw64,nftw64@GLIBC_2.2.5");
+__asm__(".symver __ppoll_chk,__ppoll_chk@GLIBC_2.16");
__asm__(".symver pthread_cond_broadcast,pthread_cond_broadcast@GLIBC_2.2.5");
__asm__(".symver pthread_cond_destroy,pthread_cond_destroy@GLIBC_2.2.5");
__asm__(".symver pthread_cond_init,pthread_cond_init@GLIBC_2.2.5");
@@ -31,14 +27,6 @@ __asm__(".symver rpc_createerr,rpc_createerr@GLIBC_2.2.5");
__asm__(".symver __rpc_thread_createerr,__rpc_thread_createerr@GLIBC_2.2.5");
__asm__(".symver __strtoll_l,__strtoll_l@GLIBC_2.2.5");
__asm__(".symver __strtoull_l,__strtoull_l@GLIBC_2.2.5");
-/*__asm__(".symver _sys_errlist,_sys_errlist@GLIBC_2.3");
-__asm__(".symver sys_errlist,sys_errlist@GLIBC_2.3");*/
-__asm__(".symver _sys_errlist,_sys_errlist@GLIBC_2.2.5");
-__asm__(".symver sys_errlist,sys_errlist@GLIBC_2.2.5");
-/*__asm__(".symver _sys_nerr,_sys_nerr@GLIBC_2.3");
-__asm__(".symver sys_nerr,sys_nerr@GLIBC_2.3");*/
-__asm__(".symver _sys_nerr,_sys_nerr@GLIBC_2.2.5");
-__asm__(".symver sys_nerr,sys_nerr@GLIBC_2.2.5");
__asm__(".symver sys_sigabbrev,sys_sigabbrev@GLIBC_2.2.5");
__asm__(".symver _sys_siglist,_sys_siglist@GLIBC_2.2.5");
__asm__(".symver sys_siglist,sys_siglist@GLIBC_2.2.5");
@@ -71,8 +59,8 @@ __asm__(".symver readlinkat,readlinkat@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __wctomb_chk,__wctomb_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __readlink_chk,__readlink_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver setipv4sourcefilter,setipv4sourcefilter@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver __isoc99_sscanf,__isoc99_sscanf@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __getlogin_r_chk,__getlogin_r_chk@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver __isoc99_sscanf,__isoc99_sscanf@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver sync_file_range,sync_file_range@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __open64_2,__open64_2@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver inet6_rth_init,inet6_rth_init@GLIBC_DONT_USE_THIS_SYMBOL");
@@ -101,14 +89,14 @@ __asm__(".symver __confstr_chk,__confstr_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __wcsncat_chk,__wcsncat_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver setsourcefilter,setsourcefilter@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver xdr_u_quad_t,xdr_u_quad_t@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver __fread_unlocked_chk,__fread_unlocked_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver eaccess,eaccess@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver __fread_unlocked_chk,__fread_unlocked_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver inet6_option_alloc,inet6_option_alloc@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __openat64_2,__openat64_2@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver sched_setaffinity,sched_setaffinity@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver inet6_option_append,inet6_option_append@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver futimens,futimens@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver renameat,renameat@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver futimens,futimens@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __wmemset_chk,__wmemset_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver inet6_opt_get_val,inet6_opt_get_val@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver unshare,unshare@GLIBC_DONT_USE_THIS_SYMBOL");
@@ -173,8 +161,8 @@ __asm__(".symver splice,splice@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver eventfd_write,eventfd_write@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver vmsplice,vmsplice@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver getsourcefilter,getsourcefilter@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver __isoc99_vwscanf,__isoc99_vwscanf@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver epoll_ctl,epoll_ctl@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver __isoc99_vwscanf,__isoc99_vwscanf@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver gnu_dev_minor,gnu_dev_minor@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __memcpy_chk,__memcpy_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __isoc99_vfscanf,__isoc99_vfscanf@GLIBC_DONT_USE_THIS_SYMBOL");
@@ -210,7 +198,6 @@ __asm__(".symver pipe2,pipe2@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __strcat_chk,__strcat_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver faccessat,faccessat@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __asprintf_chk,__asprintf_chk@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver ppoll,ppoll@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __recvfrom_chk,__recvfrom_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver inet6_opt_set_val,inet6_opt_set_val@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __ptsname_r_chk,__ptsname_r_chk@GLIBC_DONT_USE_THIS_SYMBOL");
@@ -224,29 +211,29 @@ __asm__(".symver __readlinkat_chk,__readlinkat_chk@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver dlinfo,dlinfo@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver dladdr1,dladdr1@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver dlmopen,dlmopen@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutexattr_getprotocol,pthread_mutexattr_getprotocol@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutex_setprioceiling,pthread_mutex_setprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutexattr_setprioceiling,pthread_mutexattr_setprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_getaffinity_np,pthread_getaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver __pthread_cleanup_routine,__pthread_cleanup_routine@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_condattr_setclock,pthread_condattr_setclock@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutex_getprioceiling,pthread_mutex_getprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_tryjoin_np,pthread_tryjoin_np@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver __pthread_register_cancel_defer,__pthread_register_cancel_defer@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_timedjoin_np,pthread_timedjoin_np@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __pthread_unregister_cancel_restore,__pthread_unregister_cancel_restore@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutexattr_setprioceiling,pthread_mutexattr_setprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutexattr_getprotocol,pthread_mutexattr_getprotocol@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver pthread_attr_setaffinity_np,pthread_attr_setaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver __pthread_cleanup_routine,__pthread_cleanup_routine@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_barrierattr_getpshared,pthread_barrierattr_getpshared@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver pthread_condattr_getclock,pthread_condattr_getclock@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver __pthread_register_cancel_defer,__pthread_register_cancel_defer@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutexattr_setprotocol,pthread_mutexattr_setprotocol@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __pthread_unwind_next,__pthread_unwind_next@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_timedjoin_np,pthread_timedjoin_np@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_setschedprio,pthread_setschedprio@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutex_consistent_np,pthread_mutex_consistent_np@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_attr_getaffinity_np,pthread_attr_getaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver pthread_setaffinity_np,pthread_setaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutex_getprioceiling,pthread_mutex_getprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutexattr_getrobust_np,pthread_mutexattr_getrobust_np@GLIBC_DONT_USE_THIS_SYMBOL");
+__asm__(".symver pthread_mutex_setprioceiling,pthread_mutex_setprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver pthread_mutexattr_getprioceiling,pthread_mutexattr_getprioceiling@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_attr_getaffinity_np,pthread_attr_getaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_barrierattr_getpshared,pthread_barrierattr_getpshared@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_condattr_setclock,pthread_condattr_setclock@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_tryjoin_np,pthread_tryjoin_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_setschedprio,pthread_setschedprio@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_getaffinity_np,pthread_getaffinity_np@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver pthread_mutexattr_setrobust_np,pthread_mutexattr_setrobust_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutexattr_getrobust_np,pthread_mutexattr_getrobust_np@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutexattr_setprotocol,pthread_mutexattr_setprotocol@GLIBC_DONT_USE_THIS_SYMBOL");
-__asm__(".symver pthread_mutex_consistent_np,pthread_mutex_consistent_np@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver ns_put16,ns_put16@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver ns_initparse,ns_initparse@GLIBC_DONT_USE_THIS_SYMBOL");
__asm__(".symver __p_rcode,__p_rcode@GLIBC_DONT_USE_THIS_SYMBOL");
diff --git a/tools/apbuild/buildlist b/tools/apbuild/buildlist
index 24e789fd..be6443c2 100755
--- a/tools/apbuild/buildlist
+++ b/tools/apbuild/buildlist
@@ -5,7 +5,9 @@
if [ -e syms ]; then rm syms; fi
if [ -e allsym ]; then rm allsym; fi
-for f in /lib/*; do
+
+host=`gcc -v 2>&1 | grep 'Target:' | sed 's/Target: //'`
+for f in /lib/* /lib/$host/*; do
if [ ! -f $f ]; then continue; fi
readelf -s --wide $f >>syms
objdump -T $f | grep "GLIBC_" | sed 's/\(.*\)GLIBC_//; s/)//' | grep -v PRIVATE | column -t >>allsym