[MPlayer-dev-eng] [PATCH] initial DragonFly BSD support

Pawel Biernacki kaktus at DragonFlyBSD.pl
Tue Aug 31 19:20:48 CEST 2004



On Mon, 30 Aug 2004, Joey Parrish wrote:

> On Mon, Aug 30, 2004 at 08:25:38PM +0200, Torinthiel wrote:
>> On Mon, Aug 30, 2004 at 08:07:47PM +0200, Pawel Biernacki wrote:
>>> Ok. I'll prepare patches for lrint, but I still think that redefining
>>> DragonFly to FreeBSD isn't good idea.
>>
>> I don't take it as 'redefining' More like 'these systems are similar,
>> treat them likely'. This way
>> 1. If an issue arises, it's automatically fixed in all systems
>> 2. Code is easier to read -> to maintain
>> 3. If there is something DragonFly specific, you can still use #ifdef dragonlfy
>> 4. If DragonFly gets too different from other BSDs it can still be separated
>
> I agree.
>

Ok, is this patch is good enough to be commited?

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.909
diff -u -r1.909 configure
--- configure   27 Aug 2004 20:43:04 -0000  1.909
+++ configure   31 Aug 2004 17:06:18 -0000
@@ -6952,6 +6952,11 @@
  #define X11_FULLSCREEN 1
  #endif

+/* This is current workaround for DragonFly BSD and GCC 3.4.1 */
+#if defined(__DragonFly__) && !defined(__FreeBSD__)
+#define (__FreeBSD__)
+#endif
+
  #endif /* MPLAYER_CONFIG_H */
  EOF

Index: osdep/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- osdep/Makefile  27 Jun 2004 17:54:31 -0000  1.16
+++ osdep/Makefile  31 Aug 2004 17:06:18 -0000
@@ -27,6 +27,15 @@
  endif
  SRCS += $(timer)
  SRCS += $(getch)
+ifeq ($(TARGET_OS),FreeBSD)
+SRCS += lrintf.c
+endif
+ifeq ($(TARGET_OS),NetBSD)
+SRCS += lrintf.c
+endif
+ifeq ($(TARGET_OS),OpenBSD)
+SRCS += lrintf.c
+endif

  OBJS=$(SRCS:.c=.o)

--- /dev/null   2004-08-31 20:19:47.000000000 +0200
+++ osdep/lrintf.c      2004-08-31 21:01:39.000000000 +0200
@@ -0,0 +1,7 @@
+#include "../config.h"
+
+#ifndef lrint
+#include <math.h>
+#define        lrintf(x) rintf(x)
+#endif
+




More information about the MPlayer-dev-eng mailing list