[MPlayer-dev-eng] Some small AmigaOS4 patches to compile last mplayer
Diego Biurrun
diego at biurrun.de
Fri Sep 19 00:26:42 CEST 2008
On Thu, Sep 18, 2008 at 12:21:57PM +0200, Andrea Palmatè wrote:
>
> Another thing.
> Where i must send the diff of libdvdcss?
Send it to the libdvdcss-devel mailing list.
> --- Makefile (revision 27632)
> +++ Makefile (working copy)
> @@ -396,6 +396,7 @@
>
> SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
> SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c
> +SRCS_COMMON-$(NEED_GLOB_AOS) += osdep/glob-aos.c
This file is never added, the patch is broken.
> --- configure (revision 27632)
> +++ configure (working copy)
> @@ -3520,9 +3520,15 @@
> _def_glob='#define HAVE_GLOB 1'
> _need_glob=no
> else
> +if amigaos ; then
> _def_glob='#undef HAVE_GLOB'
> + _need_glob=no
> + _need_glob_aos=yes
> +else
> + _def_glob='#undef HAVE_GLOB'
> _need_glob=yes
> fi
> +fi
> echores "$_glob"
You got this whole portability thing backwards. The goal is clearly not
to have 'if some_os' everywhere...
> --- mplayer.c (revision 27632)
> +++ mplayer.c (working copy)
> @@ -733,7 +733,7 @@
>
> -#ifndef __MINGW32__
> +#if !defined(__MINGW32__) && !defined(__AMIGAOS4__)
> static void child_sighandler(int x){
> pid_t pid;
> while((pid=waitpid(-1,NULL,WNOHANG)) > 0);
> @@ -2891,7 +2891,7 @@
> current_module = NULL;
>
> /// Catch signals
> -#ifndef __MINGW32__
> +#if !defined(__MINGW32__) && !defined(__AMIGAOS4__)
> signal(SIGCHLD,child_sighandler);
> #endif
These should also really be proper configure checks.
same below
> --- osdep/shmem.c (revision 27632)
> +++ osdep/shmem.c (working copy)
> @@ -58,10 +58,17 @@
> #endif
> break;
> case 1: // ========= MAP_SHARED + /dev/zero ==========
> +#ifndef __amigaos4__
> if (devzero == -1 && (devzero = open("/dev/zero", O_RDWR, 0)) == -1) break;
> p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,devzero,0);
> if(p==MAP_FAILED) break; // failed
> mp_dbg(MSGT_OSDEP, MSGL_DBG2, "shmem: %d bytes allocated using mmap /dev/zero (%p)\n",size,p);
> +#else
> + p=malloc(size);
> + if(p==NULL) break; // failed
> + memset(p,0,size);
> + mp_dbg(MSGT_OSDEP, MSGL_DBG2, "shmem: %d bytes allocated using static memory\n",size);
> +#endif
ditto
This file has no __foo_os__ ugliness in it, we should not be adding any.
Diego
More information about the MPlayer-dev-eng
mailing list