changeset 1236:e6c69ef37b7b

More MacOS fixes.
author nenolod@tiamat.local
date Wed, 11 Jul 2007 07:55:13 -0500
parents 90e843a4a266
children 0d5b0f861bf0 9d802f0a55af
files src/flac/libflac/memory.c src/madplug/Makefile
diffstat 2 files changed, 7 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/flac/libflac/memory.c	Wed Jul 11 05:49:16 2007 -0500
+++ b/src/flac/libflac/memory.c	Wed Jul 11 07:55:13 2007 -0500
@@ -35,7 +35,11 @@
 
 #include "private/memory.h"
 #include "FLAC/assert.h"
-#include <malloc.h>
+#include <stdlib.h>
+
+#ifdef __DARWIN
+# undef FLAC__ALIGN_MALLOC_DATA
+#endif
 
 void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address)
 {
@@ -43,25 +47,9 @@
 
 	FLAC__ASSERT(0 != aligned_address);
 
-#ifdef FLAC__ALIGN_MALLOC_DATA
-	/* align on 32-byte (256-bit) boundary */
-#if 0
-	x = malloc(bytes+31);
-	/* there's got to be a better way to do this right for all archs */
-	if(sizeof(void*) == sizeof(unsigned))
-		*aligned_address = (void*)(((unsigned)x + 31) & -32);
-	else if(sizeof(void*) == sizeof(FLAC__uint64))
-		*aligned_address = (void*)(((FLAC__uint64)x + 31) & (FLAC__uint64)(-((FLAC__int64)32)));
-	else
-		return 0;
-#endif
-	x = memalign(32, bytes);
+	x = malloc(bytes);
 	*aligned_address = x;
 
-#else
-	x = malloc(bytes);
-	*aligned_address = x;
-#endif
 	return x;
 }
 
--- a/src/madplug/Makefile	Wed Jul 11 05:49:16 2007 -0500
+++ b/src/madplug/Makefile	Wed Jul 11 07:55:13 2007 -0500
@@ -19,8 +19,6 @@
 
 CFLAGS   += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(ARCH_DEFINES) $(SIMD_CFLAGS) -I../../intl -I../.. -Wall
 
-LDFLAGS += -Wl,-rpath=$(plugindir)
-
-LIBADD = -L$(plugindir) -laudid3tag -lmad $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS)
+LIBADD = -L/opt/local/lib -L$(plugindir) -laudid3tag -lmad $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS)
 
 include ../../mk/objective.mk