[MPlayer-dev-eng] Re: [PATCH] GNU/kFreeBSD support

Diego Biurrun diego at biurrun.de
Mon Aug 22 16:22:11 CEST 2005


On Mon, Aug 22, 2005 at 03:56:38PM +0200, Robert Millan wrote:
> 
> Ok.  I'm attaching a new patch with all the changes you requested.
> 
> --- MPlayer-1.0pre7.old/libdha/sysdep/AsmMacros_alpha.h	2002-01-15 09:31:53.000000000 +0100
> +++ MPlayer-1.0pre7/libdha/sysdep/AsmMacros_alpha.h	2005-08-22 17:42:45.000000000 +0200
> @@ -6,7 +6,7 @@
>  
>  #ifndef __ASM_MACROS_ALPHA_H
>  #define __ASM_MACROS_ALPHA_H
> -#if defined (linux)
> +#if defined (linux) || defined(__GLIBC__)
>  #include <sys/io.h>
>  #elif defined (__FreeBSD__)
>  #include <sys/types.h>
> --- MPlayer-1.0pre7.old/libmpdvdkit2/bswap.h	2005-03-11 03:40:28.000000000 +0100
> +++ MPlayer-1.0pre7/libmpdvdkit2/bswap.h	2005-08-22 17:42:45.000000000 +0200
> @@ -32,7 +32,7 @@
>  
>  #else 
>  
> -#if defined(__linux__)
> +#if defined(__linux__) || defined(__GLIBC__)
>  #include <byteswap.h>
>  #define B2N_16(x) x = bswap_16(x)
>  #define B2N_32(x) x = bswap_32(x)

In these two cases you add #if defined(__GLIBC__) to #if defined(__linux__).

> --- MPlayer-1.0pre7.old/libmpdvdkit2/dvd_reader.c	2005-03-11 03:40:28.000000000 +0100
> +++ MPlayer-1.0pre7/libmpdvdkit2/dvd_reader.c	2005-08-22 17:42:45.000000000 +0200
> @@ -45,7 +45,7 @@
>  #include </usr/conf/h/mnttab.h>
>  #elif defined(SYS_BSD)
>  #include <fstab.h>
> -#elif defined(__linux__)
> +#elif defined(__GLIBC__)
>  #include <mntent.h>
>  #endif
>  
> @@ -320,7 +320,7 @@
>  	char *path_copy;
>  #if defined(SYS_BSD)
>  	struct fstab* fe;
> -#elif defined(__sun) || defined(__linux__)
> +#elif defined(__sun) || defined(__GLIBC__)
>  	FILE *mntfile;
>  #endif
>  
> @@ -393,7 +393,7 @@
>  	    }
>  	    fclose( mntfile );
>  	}
> -#elif defined(__linux__)
> +#elif defined(__GLIBC__)
>          mntfile = fopen( MOUNTED, "r" );
>          if( mntfile ) {
>              struct mntent *me;

Here you replace #if defined(__linux__) by #if defined(__GLIBC__).

Are you sure you cannot just use #if defined(__GLIBC__) everywhere?

> --- MPlayer-1.0pre7.old/loader/win32.c	2005-04-15 22:17:12.000000000 +0200
> +++ MPlayer-1.0pre7/loader/win32.c	2005-08-22 17:42:45.000000000 +0200
> @@ -1027,7 +1027,7 @@
>  
>  /* MPlayer: linux detection enabled (based on proc/cpuinfo) for checking
>     fdiv_bug and fpu emulation flags -- alex/MPlayer */
> -#ifdef __linux__
> +#if defined(__linux__) || (defined(__GLIBC__) && (defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__)))

Are you sure about this NetBSD change?

Diego




More information about the MPlayer-dev-eng mailing list