Package: gambas3 / 3.5.4-2

kfreebsd_support Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Index: gambas3/acinclude.m4
===================================================================
--- gambas3.orig/acinclude.m4	2013-09-03 12:20:15.763016116 +0200
+++ gambas3/acinclude.m4	2013-09-03 14:26:38.389881429 +0200
@@ -502,6 +502,17 @@
       AC_DEFINE(OS_SOLARIS, 1, [Target system is Solaris])
       AC_DEFINE(SYSTEM, "Solaris", [Operating system])
       ;;
+    *-*-k*bsd*-gnu )
+      SYSTEM=GNU
+      AC_DEFINE(OS_GNU, 1, [Target system is of GNU family])
+      AC_DEFINE(OS_BSD, 1, [Target system is of BSD family])
+      AC_DEFINE(SYSTEM, "GNU/kFreeBSD", [Operating system])
+      ;;
+    *-*-gnu* )
+      SYSTEM=GNU
+      AC_DEFINE(OS_GNU, 1, [Target system is of GNU family])
+      AC_DEFINE(SYSTEM, "GNU", [Operating system])
+      ;;
     *)
       SYSTEM=UNKNOWN
       AC_DEFINE(SYSTEM, "unknown", [Operating system])
Index: gambas3/gb.v4l/src/CWebcam.h
===================================================================
--- gambas3.orig/gb.v4l/src/CWebcam.h	2013-09-03 12:19:54.983259418 +0200
+++ gambas3/gb.v4l/src/CWebcam.h	2013-09-03 14:31:31.106213225 +0200
@@ -31,11 +31,11 @@
 #include <linux/videodev2.h>
 #include <libv4lconvert.h>
 
-#ifdef OS_FREEBSD
-  #include <linux/videodev.h>
-#else
+#ifdef OS_LINUX
   #include <linux/types.h>
   #include "videodev.h"
+#else
+  #include <linux/videodev.h>
 #endif
 
 #include "gambas.h"
Index: gambas3/gb.v4l/src/gv4l2.c
===================================================================
--- gambas3.orig/gb.v4l/src/gv4l2.c	2013-09-03 12:19:54.983259418 +0200
+++ gambas3/gb.v4l/src/gv4l2.c	2013-09-03 14:33:07.281029549 +0200
@@ -46,10 +46,10 @@
 #include "main.h"
 #include "CWebcam.h"
 
-#ifdef OS_FREEBSD
-  #include <stdint.h>
-#else
+#ifdef OS_LINUX
   #include <asm/types.h>
+#else
+  #include <stdint.h>
 #endif
 
 //
Index: gambas3/main/gbc/gbi.c
===================================================================
--- gambas3.orig/main/gbc/gbi.c	2013-09-03 12:19:54.995259277 +0200
+++ gambas3/main/gbc/gbi.c	2013-09-03 14:28:32.464439892 +0200
@@ -45,7 +45,7 @@
 
 #include <dlfcn.h>
 
-#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_CYGWIN)
+#if defined(OS_LINUX) || defined(OS_GNU) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_CYGWIN)
 	#define lt_dlinit() (0)
 	#define lt_dlhandle void *
 	#define lt_dlopenext(_path) dlopen(_path, RTLD_LAZY)