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 #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