changeset 6057:31e465fda59c

various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
author arpi
date Sun, 12 May 2002 02:18:52 +0000
parents f980563afdbc
children f81923e3d084
files configure liba52/parse.c libdha/Makefile libdha/sysdep/pci_openbsd.c libmpcodecs/vd.c libvo/sub.h postproc/swscale.c
diffstat 7 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun May 12 01:51:09 2002 +0000
+++ b/configure	Sun May 12 02:18:52 2002 +0000
@@ -1399,7 +1399,7 @@
   _def_malloc='#undef HAVE_MALLOC_H'
 fi
 # malloc.h emits a warning in FreeBSD
-freebsd && _def_malloc='#undef HAVE_MALLOC_H'
+(freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H'
 echores "$_malloc"
 
 
--- a/liba52/parse.c	Sun May 12 01:51:09 2002 +0000
+++ b/liba52/parse.c	Sun May 12 02:18:52 2002 +0000
@@ -35,9 +35,6 @@
 #ifdef HAVE_MEMALIGN
 /* some systems have memalign() but no declaration for it */
 void * memalign (size_t align, size_t size);
-#else
-/* assume malloc alignment is sufficient */
-#define memalign(align,size) malloc (size)
 #endif
 
 typedef struct {
--- a/libdha/Makefile	Sun May 12 01:51:09 2002 +0000
+++ b/libdha/Makefile	Sun May 12 02:18:52 2002 +0000
@@ -15,6 +15,10 @@
 OBJS=$(SRCS:.c=.o)
 
 CFLAGS  = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+LIBS = 
+ifeq ($(TARGET_OS),OpenBSD)
+LIBS += -li386
+endif
 
 .SUFFIXES: .c .o
 
@@ -24,7 +28,7 @@
 	$(CC) -c $(CFLAGS) -o $@ $<
 
 $(LIBNAME):     $(OBJS)
-	$(CC) -shared -o $(LIBNAME) $(OBJS)
+	$(CC) -shared -o $(LIBNAME) $(OBJS) $(LIBS)
 	ln -sf $(LIBNAME) $(SHORTNAME)
 
 all:    $(LIBNAME) $(SHORTNAME)
@@ -52,8 +56,12 @@
 	mkdir -p $(prefix)/lib
 	install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME)
 	rm -f $(prefix)/lib/libdha.so
-	ln -sf $(LIBNAME) $(prefix)/lib/libdha.so
+	ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME)
+ifeq ($(TARGET_OS),OpenBSD)
+	ldconfig -R
+else
 	ldconfig
+endif
 
 #
 # include dependency files if they exist
--- a/libdha/sysdep/pci_openbsd.c	Sun May 12 01:51:09 2002 +0000
+++ b/libdha/sysdep/pci_openbsd.c	Sun May 12 02:18:52 2002 +0000
@@ -5,6 +5,8 @@
 */
 
 #include <errno.h>
+#include <sys/types.h>
+#include <machine/sysarch.h>
 
 static __inline__ int enable_os_io(void)
 {
--- a/libmpcodecs/vd.c	Sun May 12 01:51:09 2002 +0000
+++ b/libmpcodecs/vd.c	Sun May 12 02:18:52 2002 +0000
@@ -18,6 +18,7 @@
 #include "stream.h"
 #include "demuxer.h"
 #include "stheader.h"
+#include "dec_video.h"
 
 #include "vd.h"
 #include "vf.h"
--- a/libvo/sub.h	Sun May 12 01:51:09 2002 +0000
+++ b/libvo/sub.h	Sun May 12 02:18:52 2002 +0000
@@ -102,6 +102,7 @@
 void vo_init_osd();
 int vo_update_osd(int dxs,int dys);
 int vo_osd_changed(int new_value);
+int vo_osd_check_range_update(int,int,int,int);
 
 extern int vo_osd_changed_flag;
 
--- a/postproc/swscale.c	Sun May 12 01:51:09 2002 +0000
+++ b/postproc/swscale.c	Sun May 12 02:18:52 2002 +0000
@@ -55,6 +55,8 @@
 #include <assert.h>
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#else
+#include <stdlib.h>
 #endif
 #include "swscale.h"
 #include "../cpudetect.h"