diff options
author | gabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-11-13 20:53:40 +0000 |
---|---|---|
committer | gabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-11-13 20:53:40 +0000 |
commit | 2f75c8e9d306d8626fdfb066bf0d167463339498 (patch) | |
tree | cec2802ca89fe71af41882d2022be0b793371b93 | |
parent | d911fb37f8c3d78ee89bb3aafa0d08e7d2bebbb8 (diff) | |
download | mpv-2f75c8e9d306d8626fdfb066bf0d167463339498.tar.bz2 mpv-2f75c8e9d306d8626fdfb066bf0d167463339498.tar.xz |
cumulative libc5 compatibility patch ;)
- VESA detection by sys/io.h header
- workaround a missing define on libc5
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11456 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-x | configure | 36 | ||||
-rw-r--r-- | libdha/sysdep/pci_linux.c | 2 | ||||
-rw-r--r-- | osdep/lrmi.c | 4 | ||||
-rw-r--r-- | osdep/vbelib.c | 6 |
4 files changed, 40 insertions, 8 deletions
@@ -2098,7 +2098,19 @@ if test "$_inttypes" = yes ; then # nothing to do : else - die "cannot find header inttypes.h (see DOCS/HTML/en/faq.html)" + echores "no" + echocheck "bitypes.h (inttypes.h predecessor)" + cat > $TMPC << EOF +#include <sys/bitypes.h> +int main(void) { return 0; } +EOF + _inttypes=no + cc_check && _inttypes=yes + if test "$_inttypes" = yes ; then + die "you don't have inttypes.h, but sys/bitypes.h is present. Please copy etc/inttypes.h.link into the include path, and re-run configure." + else + die "cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/en/faq.html)" + fi fi echores "$_inttypes" @@ -3504,22 +3516,27 @@ EOF esac -if test "$_vesa" != no ; then echocheck "VESA support" +if test "$_vesa" = auto ; then if x86 && linux ; then + _vesa=no + cat > $TMPC << EOF +#include <sys/io.h> +int main(void) { return 0; } +EOF + cc_check && _vesa=yes +fi +fi +if test "$_vesa" = yes ; then _def_vesa='#define HAVE_VESA 1' _vosrc="$_vosrc vo_vesa.c vesa_lvo.c" _vomodules="vesa $_vomodules" echores "yes" else _def_vesa='#undef HAVE_VESA' - _novomodules="vesa $_novomodules" echores "no (not supported on this OS/architecture)" + _novomodules="vesa $_novomodules" fi -else -_def_vesa='#undef HAVE_VESA' -fi - ################# # VIDEO + AUDIO # @@ -5878,6 +5895,11 @@ cat > config.h << EOF /* use GNU internationalization */ $_def_i18n +/* missing mmap function on libc5 systems */ +#ifndef MAP_FAILED +# define MAP_FAILED ((void *) -1) +#endif + /* use setlocale() function */ $_def_setlocale diff --git a/libdha/sysdep/pci_linux.c b/libdha/sysdep/pci_linux.c index ad9715b2d8..a4486dd041 100644 --- a/libdha/sysdep/pci_linux.c +++ b/libdha/sysdep/pci_linux.c @@ -5,7 +5,7 @@ */ #include <errno.h> #ifdef __i386__ -#include <sys/perm.h> +// is this needed? #include <sys/perm.h> #else #if !defined(__sparc__) && !defined(__powerpc__) #include <sys/io.h> diff --git a/osdep/lrmi.c b/osdep/lrmi.c index c8aac7700c..c04a470f75 100644 --- a/osdep/lrmi.c +++ b/osdep/lrmi.c @@ -11,6 +11,9 @@ This software has NO WARRANTY. Use it at your own risk. Original location: http://cvs.debian.org/lrmi/ */ +#include "../config.h" +#ifdef HAVE_VESA + #include <signal.h> #include <stdio.h> #include <string.h> @@ -918,3 +921,4 @@ LRMI_int(int i, struct LRMI_regs *r) return vret; } +#endif diff --git a/osdep/vbelib.c b/osdep/vbelib.c index 6b446344cb..356a0e3ac3 100644 --- a/osdep/vbelib.c +++ b/osdep/vbelib.c @@ -7,6 +7,10 @@ of GNU General Public licence v2. Written by Nick Kurshev <nickols_k@mail.ru> */ + +#include <../config.h> +#ifdef HAVE_VESA + #include "vbelib.h" #include "lrmi.h" #include <stdlib.h> @@ -728,3 +732,5 @@ void vbeUnmapVideoBuffer(unsigned long linear_addr,unsigned long size) if(verbose > 1) printf("vbelib: vbeUnmapVideoBuffer(%08lX,%08lX)\n",linear_addr,size); munmap((void *)linear_addr,size); } + +#endif |