[MPlayer-dev-eng] [PATCH] Mainly OpenBSD
Björn Sandell
biorn at dce.chalmers.se
Tue May 14 22:08:07 CEST 2002
Howdy,
Here's a few patches mainly concerning OpenBSD (and, for configure,
NetBSD) and some hunting for warnings.
The patch to configure is probably worth explaning :-)
First, I have moved -li386 and -lossaudio to be added where it is
detected - it feels better than to unconditionally tack'em on.
Secondly I have disabled looking for sys/soundcard.h and soundcard.h if
--disable-ossaudio is specified. This is under the (wild) assumption that
soundcard.h is oss specific. Is that assumption correct?
Also there's a bunch of files with no newline at end of file:
mplayer.h my_profile.h Gui/mplayer/gtk/menu.h Gui/mplayer/gtk/opts.h
libao2/afmt.c libdha/mtrr.c libmpcodecs/vd_zlib.c
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.472
diff -u -r1.472 configure
--- configure 14 May 2002 12:37:37 -0000 1.472
+++ configure 14 May 2002 20:00:44 -0000
@@ -1406,7 +1406,7 @@
else
_def_malloc='#undef HAVE_MALLOC_H'
fi
-# malloc.h emits a warning in FreeBSD
+# malloc.h emits a warning in FreeBSD and OpenBSD
(freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H'
echores "$_malloc"
@@ -1522,7 +1522,7 @@
fi
echores "yes (using $_ld_pthread)"
-
+if test "$_ossaudio" != no ; then
echocheck "sys/soundcard.h"
cat > $TMPC << EOF
#include <sys/soundcard.h>
@@ -1554,6 +1554,10 @@
fi
echores "$_soundcard"
fi
+else
+ _def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H'
+ _def_soundcard='#undef HAVE_SOUNDCARD_H'
+fi
echocheck "sys/dvdio.h"
cat > $TMPC << EOF
@@ -2594,6 +2598,7 @@
else
if netbsd || openbsd ; then
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
+ _ld_arch="$_ld_arch -lossaudio"
else
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
fi
@@ -2968,6 +2973,9 @@
_dep_win32='loader/libloader.a'
_codecmodules="win32 $_codecmodules"
echores "yes (using $_win32libdir)"
+ if netbsd || openbsd ; then
+ x86 && _ld_win32="$_ld_win32 -li386"
+ fi
else
_def_win32='#undef USE_WIN32DLL'
_nocodecmodules="win32 $_nocodecmodules"
@@ -3616,10 +3624,6 @@
_ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
bsdos && _ld_arch="$_ld_arch -ldvd"
-if netbsd || openbsd ; then
- _ld_arch="$_ld_arch -lossaudio"
- x86 && _ld_arch="$_ld_arch -li386"
-fi
_def_debug='#undef MP_DEBUG'
test "$_debug" && _def_debug='#define MP_DEBUG 1'
Index: libdha/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- libdha/Makefile 12 May 2002 02:18:50 -0000 1.9
+++ libdha/Makefile 14 May 2002 20:00:44 -0000
@@ -17,7 +17,9 @@
CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
LIBS =
ifeq ($(TARGET_OS),OpenBSD)
+ifeq ($(TARGET_ARCH_X86),yes)
LIBS += -li386
+endif
endif
.SUFFIXES: .c .o
Index: libmpcodecs/native/fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/fli.c,v
retrieving revision 1.10
diff -u -r1.10 fli.c
--- libmpcodecs/native/fli.c 28 Feb 2002 03:01:53 -0000 1.10
+++ libmpcodecs/native/fli.c 14 May 2002 20:00:44 -0000
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "config.h"
#include "bswap.h"
#include "mp_msg.h"
Index: libmpcodecs/native/nuppelvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/nuppelvideo.c,v
retrieving revision 1.6
diff -u -r1.6 nuppelvideo.c
--- libmpcodecs/native/nuppelvideo.c 13 Apr 2002 18:05:57 -0000 1.6
+++ libmpcodecs/native/nuppelvideo.c 14 May 2002 20:00:44 -0000
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <strings.h>
#include "config.h"
#include "mp_msg.h"
Index: libmpcodecs/native/roqav.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/roqav.c,v
retrieving revision 1.6
diff -u -r1.6 roqav.c
--- libmpcodecs/native/roqav.c 18 Apr 2002 17:08:08 -0000 1.6
+++ libmpcodecs/native/roqav.c 14 May 2002 20:00:44 -0000
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "config.h"
#include "bswap.h"
#include "mp_msg.h"
Index: vidix/vidixlib.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/vidixlib.c,v
retrieving revision 1.10
diff -u -r1.10 vidixlib.c
--- vidix/vidixlib.c 27 Apr 2002 22:42:27 -0000 1.10
+++ vidix/vidixlib.c 14 May 2002 20:00:45 -0000
@@ -24,6 +24,10 @@
#include <dlfcn.h> /* GLIBC specific. Exists under cygwin too! */
#include <dirent.h>
+#if defined(__OpenBSD__) && !defined(__ELF__)
+#define dlsym(h,s) dlsym(h, "_" s)
+#endif
+
#include "vidixlib.h"
#include "../bswap.h"
More information about the MPlayer-dev-eng
mailing list