# HG changeset patch # User gabucino # Date 1068756820 0 # Node ID 22f8732b5d972fc3482d0292d141a16583927c0e # Parent 74c7ac1698bc79bb593515df3238b045220d8c35 cumulative libc5 compatibility patch ;) - VESA detection by sys/io.h header - workaround a missing define on libc5 diff -r 74c7ac1698bc -r 22f8732b5d97 configure --- a/configure Thu Nov 13 13:22:41 2003 +0000 +++ b/configure Thu Nov 13 20:53:40 2003 +0000 @@ -2098,7 +2098,19 @@ # 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 +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 @@ esac -if test "$_vesa" != no ; then echocheck "VESA support" +if test "$_vesa" = auto ; then if x86 && linux ; then + _vesa=no + cat > $TMPC << EOF +#include +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' + echores "no (not supported on this OS/architecture)" _novomodules="vesa $_novomodules" - echores "no (not supported on this OS/architecture)" -fi -else -_def_vesa='#undef HAVE_VESA' -fi - +fi ################# # VIDEO + AUDIO # @@ -5878,6 +5895,11 @@ /* 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 -r 74c7ac1698bc -r 22f8732b5d97 libdha/sysdep/pci_linux.c --- a/libdha/sysdep/pci_linux.c Thu Nov 13 13:22:41 2003 +0000 +++ b/libdha/sysdep/pci_linux.c Thu Nov 13 20:53:40 2003 +0000 @@ -5,7 +5,7 @@ */ #include #ifdef __i386__ -#include +// is this needed? #include #else #if !defined(__sparc__) && !defined(__powerpc__) #include diff -r 74c7ac1698bc -r 22f8732b5d97 osdep/lrmi.c --- a/osdep/lrmi.c Thu Nov 13 13:22:41 2003 +0000 +++ b/osdep/lrmi.c Thu Nov 13 20:53:40 2003 +0000 @@ -11,6 +11,9 @@ Original location: http://cvs.debian.org/lrmi/ */ +#include "../config.h" +#ifdef HAVE_VESA + #include #include #include @@ -918,3 +921,4 @@ return vret; } +#endif diff -r 74c7ac1698bc -r 22f8732b5d97 osdep/vbelib.c --- a/osdep/vbelib.c Thu Nov 13 13:22:41 2003 +0000 +++ b/osdep/vbelib.c Thu Nov 13 20:53:40 2003 +0000 @@ -7,6 +7,10 @@ of GNU General Public licence v2. Written by Nick Kurshev */ + +#include <../config.h> +#ifdef HAVE_VESA + #include "vbelib.h" #include "lrmi.h" #include @@ -728,3 +732,5 @@ if(verbose > 1) printf("vbelib: vbeUnmapVideoBuffer(%08lX,%08lX)\n",linear_addr,size); munmap((void *)linear_addr,size); } + +#endif