aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libfame
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2005-07-13 00:02:32 +0000
committerMikhail Teterin <mi@FreeBSD.org>2005-07-13 00:02:32 +0000
commit9817b68587edb91d0fc8223e373d6cf4d6cc887a (patch)
tree01eb15843e746ac8a8244313e1e864f434b1961d /multimedia/libfame
parenta0f2c30ec62d840265f84c48ff03b72ded1e812e (diff)
downloadports-9817b68587edb91d0fc8223e373d6cf4d6cc887a.tar.gz
ports-9817b68587edb91d0fc8223e373d6cf4d6cc887a.zip
Uh-oh. Fix the just committed patch-cflags to only defined HAVE_BSWAP on
i386. Add one more patch to the patch-warnings collection, to ensure warning-free compile on 64-bit platforms (tested on amd64).
Notes
Notes: svn path=/head/; revision=139014
Diffstat (limited to 'multimedia/libfame')
-rw-r--r--multimedia/libfame/files/patch-cflags6
-rw-r--r--multimedia/libfame/files/patch-warnings23
2 files changed, 27 insertions, 2 deletions
diff --git a/multimedia/libfame/files/patch-cflags b/multimedia/libfame/files/patch-cflags
index 23361f553cbe..192de78d2154 100644
--- a/multimedia/libfame/files/patch-cflags
+++ b/multimedia/libfame/files/patch-cflags
@@ -1,10 +1,12 @@
--- configure Wed Feb 11 08:12:28 2004
+++ configure Tue Jul 12 18:56:00 2005
-@@ -4500,4 +4500,7 @@
+@@ -4500,4 +4500,9 @@
case "$target" in
-+ *-*-freebsd*)
++ *86-*-freebsd*)
+ CFLAGS="$CFLAGS -DHAS_BSWAP"
+ ;;
++ *-*-freebsd*)
++ ;;
alpha*-*-linux*)
if test x$ac_cv_c_compiler_gnu = xyes; then
diff --git a/multimedia/libfame/files/patch-warnings b/multimedia/libfame/files/patch-warnings
index fe734e698110..32ad4ca0773d 100644
--- a/multimedia/libfame/files/patch-warnings
+++ b/multimedia/libfame/files/patch-warnings
@@ -131,3 +131,26 @@ Include the missing header:
- unsigned int weight_left, weight_top, weight_topright;
unsigned char *shape;
+--- src/fame_malloc.c Fri Jun 20 08:40:30 2003
++++ src/fame_malloc.c Tue Jul 12 19:59:14 2005
+@@ -22,4 +22,6 @@
+
+ #include <stdlib.h>
++#include <stdio.h>
++#include <inttypes.h>
+
+ void* fame_malloc(size_t size)
+@@ -37,7 +39,11 @@
+
+ ptr = (unsigned char*) malloc(size+ALIGN);
+- aligned = (unsigned char*) (((unsigned int)ptr & (~(ALIGN-1))) + ALIGN );
++ if (ptr == NULL) {
++ perror("fame_malloc");
++ exit(1);
++ }
++ aligned = (unsigned char*) (((uintptr_t)ptr & (~(ALIGN-1))) + ALIGN );
+ padding = aligned - 1;
+- *padding = (ALIGN-1) - ((unsigned int)ptr & (ALIGN-1));
++ *padding = (ALIGN-1) - ((uintptr_t)ptr & (ALIGN-1));
+
+ return ((void*)aligned);