From 3f7206dc5bfb84ff4e1fb494d9ecf09e98baa937 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Mon, 11 Oct 2004 10:13:05 +0000 Subject: [PATCH] fix compilation on FreeBSD (from Loren Merritt (thanks to Igla)) git-svn-id: svn://svn.videolan.org/x264/trunk@51 df754926-b1dd-0310-bc7b-ec298dee348c --- Jamfile | 6 +++++- Makefile | 1 + encoder/ratecontrol.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Jamfile b/Jamfile index 652ed6d9..df0ce44d 100644 --- a/Jamfile +++ b/Jamfile @@ -35,7 +35,7 @@ SOURCES_ALTIVEC = core/ppc/mc.c core/ppc/pixel.c ; SOURCES_X264 = $(SOURCES_C) ; if $(OSPLAT) = X86 { - DEFINES += HAVE_MALLOC_H HAVE_MMXEXT HAVE_SSE2 ; + DEFINES += HAVE_MMXEXT HAVE_SSE2 ; SOURCES_X264 += $(SOURCES_MMX) ; SOURCES_X264 += $(SOURCES_X86) ; ASFLAGS = -f elf ; @@ -44,6 +44,10 @@ if $(OSPLAT) = X86 { DEFINES += HAVE_STDINT_H ; } + if $(OS) != FREEBSD + { + DEFINES += HAVE_MALLOC_H ; + } # Don't ask NOARUPDATE = false ; diff --git a/Makefile b/Makefile index a5f51812..4a8fe5f0 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ # SRCS: core/ppc/mc.c core/ppc/pixel.c # Defines: HAVE_PPC # CFLAGS: -faltivec +# For FreeBSD, remove -DHAVE_MALLOC_H and add -DSYS_FREEBSD # PFLAGS=-DARCH_X86 -DHAVE_MMXEXT -DHAVE_SSE2 CC=gcc diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 07612634..b38bfb51 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -40,6 +40,9 @@ #ifdef SYS_MACOSX #define exp2f(x) ( (float) exp2( (x) ) ) #endif +#ifdef SYS_FREEBSD +#define exp2f(x) powf( 2, (x) ) +#endif typedef struct -- 2.40.0