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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
Index: trunk/spectro/inst.c
===================================================================
--- trunk.orig/spectro/inst.c 2014-09-01 20:08:46.629215428 +0200
+++ trunk/spectro/inst.c 2014-09-01 20:08:46.621215261 +0200
@@ -59,11 +59,12 @@
#if defined(ENABLE_FAST_SERIAL)
instType fast_ser_inst_type(icoms *p, int tryhard,
inst_code (*uicallback)(void *cntx, inst_ui_purp purp), void *cntx);
+#endif /* ENABLE_FAST_SERIAL */
# if defined(ENABLE_SERIAL)
static instType ser_inst_type(icoms *p,
inst_code (*uicallback)(void *cntx, inst_ui_purp purp), void *cntx);
# endif /* ENABLE_SERIAL */
-#endif /* ENABLE_FAST_SERIAL */
+
/* ------------------------------------ */
/* Default methods for instrument class */
Index: trunk/spectro/icoms_nt.c
===================================================================
--- trunk.orig/spectro/icoms_nt.c 2014-09-01 20:08:46.629215428 +0200
+++ trunk/spectro/icoms_nt.c 2014-09-01 20:08:46.621215261 +0200
@@ -22,8 +22,12 @@
struct fast_com_name *next;
} fast_com_name;
-#if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL)
-instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *);
+#if defined(ENABLE_FAST_SERIAL)
+instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *);
+#endif /* ENABLE_FAST_SERIAL */
+
+#if defined(ENABLE_SERIAL)
+instType ser_inst_type(icoms *p, void *, void *);
#endif /* ENABLE_SERIAL */
/* Create and return a list of available serial ports or USB instruments for this system. */
Index: trunk/spectro/icoms_ux.c
===================================================================
--- trunk.orig/spectro/icoms_ux.c 2014-09-01 20:08:46.629215428 +0200
+++ trunk/spectro/icoms_ux.c 2014-09-01 20:08:46.621215261 +0200
@@ -46,8 +46,15 @@
#include <mach/task_policy.h>
#endif /* __APPLE__ */
-#if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL)
-instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *);
+#include "inst.h"
+
+#if defined(ENABLE_FAST_SERIAL)
+instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *);
+#endif /* ENABLE_FAST_SERIAL */
+
+#if defined(ENABLE_SERIAL)
+static instType ser_inst_type(icoms *p,
+ inst_code (*uicallback)(void *cntx, inst_ui_purp purp), void *cntx);
#endif /* ENABLE_SERIAL */
/* Create and return a list of available serial ports or USB instruments for this system */
@@ -134,7 +141,12 @@
icoms *icom;
if ((path = p->get_last_path(p)) != NULL
&& (icom = new_icoms(path, p->log)) != NULL) {
+#if defined(ENABLE_FAST_SERIAL)
instType itype = fast_ser_inst_type(icom, 0, NULL, NULL);
+#endif
+#if defined(ENABLE_SERIAL)
+ instType itype = ser_inst_type(icom, NULL, NULL);
+#endif
if (itype != instUnknown)
icompaths_set_serial_itype(path, itype);
icom->del(icom);
@@ -279,7 +291,12 @@
icoms *icom;
if ((path = p->get_last_path(p)) != NULL
&& (icom = new_icoms(path, p->log)) != NULL) {
+#if defined(ENABLE_FAST_SERIAL)
instType itype = fast_ser_inst_type(icom, 0, NULL, NULL);
+#endif
+#if defined(ENABLE_SERIAL)
+ instType itype = ser_inst_type(icom, (void *)NULL, (void *)NULL);
+#endif
if (itype != instUnknown)
icompaths_set_serial_itype(path, itype);
icom->del(icom);
Index: trunk/spectro/Makefile.UNIX
===================================================================
--- trunk.orig/spectro/Makefile.UNIX 2014-01-31 05:08:58.000000000 +0100
+++ trunk/spectro/Makefile.UNIX 2014-09-01 20:10:22.819216376 +0200
@@ -26,7 +26,7 @@
LIBOF =
RANLIB = echo
AS = as
-CCFLAGSDEF = -DUNIX -c
+CCFLAGSDEF = -DUNIX -c -fPIC
CC = cc $(CCFLAGS) $(STDHDRS)
CCOF = -o
LINKFLAGSDEF = -lm -lpthread -lrt
|