[MPlayer-dev-eng] [PATCH] mmap support for OS/2

Diego Biurrun diego at biurrun.de
Sun Feb 24 19:27:21 CET 2008


On Mon, Feb 25, 2008 at 01:12:56AM +0900, KO Myung-Hun wrote:
> 
> This patch add a simple mmap support for OS/2.
> 
> --- osdep/mmap.h	(revision 0)
> +++ osdep/mmap.h	(revision 0)
> @@ -0,0 +1,73 @@
> +
> +#ifndef MMAP_H
> +#define MMAP_H

MPLAYER_ prefix please.

> +#ifdef __cplusplus
> +extern "C" {
> +#endif

IMO unnecessary and ugly.

> +/* MAP_FAILED is defined in config.h */
> +#if 0
> +/*
> + * Error return from mmap()
> + */
> +#ifndef MAP_FAILED
> +#define MAP_FAILED  ((void *)-1)
> +#endif
> +#endif

I don't like #if 0 code...

> +#endif

#endif /* MPLAYER_MMAP_H */

> --- osdep/Makefile	(revision 26091)
> +++ osdep/Makefile	(working copy)
> @@ -27,8 +27,16 @@
>  ifeq ($(TARGET_OS),OS/2)
>  getch = getch2-os2.c
>  endif
> +
> +ifneq ($(HAVE_SYS_MMAN_H),yes)
> +ifeq ($(TARGET_OS),OS/2)
> +mmap = mmap-os2.c
> +endif
> +endif

Merge the two TARGET_OS OS/2 sections.

Diego



More information about the MPlayer-dev-eng mailing list