From 4895adbaa78268bcb17ced6d89872d54b479c025 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Fri, 25 Jan 2019 20:56:29 +0100 Subject: [PATCH] LaunchAPPLServer: compatibility fix for older Universal Interfaces (fixes #77) --- LaunchAPPL/Server/LaunchAPPLServer.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LaunchAPPL/Server/LaunchAPPLServer.cc b/LaunchAPPL/Server/LaunchAPPLServer.cc index 4be90db334..dd1d3c901f 100644 --- a/LaunchAPPL/Server/LaunchAPPLServer.cc +++ b/LaunchAPPL/Server/LaunchAPPLServer.cc @@ -689,10 +689,13 @@ int main() portsAvailable[(int)Port::macTCP] = true; if(Gestalt(gestaltSerialAttr, &resp) == noErr) { + // gestaltPortADisabled and gestaltPortBDisabled are "recent" additions + // (Universal Interfaces 3.4 only). Use the literal constants for compatibility + // in case people are using older interfaces. portsAvailable[(int)Port::modemPort] = - (resp & ((1 << gestaltHidePortA) | (1<< gestaltPortADisabled))) == 0; + (resp & ((1 << gestaltHidePortA) | (1<< 5/*gestaltPortADisabled*/))) == 0; portsAvailable[(int)Port::printerPort] = - (resp & ((1 << gestaltHidePortB) | (1<< gestaltPortBDisabled))) == 0; + (resp & ((1 << gestaltHidePortB) | (1<< 6/*gestaltPortBDisabled*/))) == 0; } } #endif