libaltos: Update to support Mac OS X 10.15 (catalina)
authorKeith Packard <keithp@keithp.com>
Wed, 2 Sep 2020 01:31:03 +0000 (18:31 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Sep 2020 03:07:39 +0000 (20:07 -0700)
They decided to break device names reported by USB for some reason,
but at least the real names are still available under a different
name.

Also updated the Makefile-standalone to work on my current box;
presumably the next time I build this I'll have to update again...

Signed-off-by: Keith Packard <keithp@keithp.com>
libaltos/Makefile-standalone
libaltos/libaltos.dylib
libaltos/libaltos_darwin.c

index 1430aacb2fb07cdd65d1be3a56ececd3096edb8e..77c7cca514f1e6196288eefbd5d6372821bc00a8 100644 (file)
@@ -33,12 +33,12 @@ OS_SRCS=libaltos_posix.c libaltos_darwin.c
 #      -iwithsysroot /System/Library/Frameworks/IOKit.framework/Headers \
 #      -iwithsysroot /System/Library/Frameworks/CoreFoundation.framework/Headers
 
-XCODE=/Applications/Xcode-beta.app
-SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
+XCODE=/Applications/Xcode.app
+SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
 MINVERSION=10.5
 
 OS_LIB_CFLAGS=\
-       -DDARWIN -DPOSIX_TTY -arch i386 -arch x86_64 -isysroot $(SDK) \
+       -DDARWIN -DPOSIX_TTY -arch x86_64 -isysroot $(SDK) \
        -mmacosx-version-min=10.5 \
        -iwithsysroot /System/Library/Frameworks/JavaVM.framework/Headers \
        -iwithsysroot /System/Library/Frameworks/IOKit.framework/Headers \
index c18493ea7836aca971c0f9ebe8b3b04b1b8d85de..0d5b9c46309e1ec164fbe924bb3921b099bb8013 100755 (executable)
Binary files a/libaltos/libaltos.dylib and b/libaltos/libaltos.dylib differ
index c6b6355f870fb9e1cf33fbedb96dc93ea65fe6f0..794c021500e8673c237297c0677f224fcc15a4a1 100644 (file)
@@ -192,7 +192,8 @@ altos_list_next(struct altos_list *list, struct altos_device *device)
                if (get_number (usb_device, CFSTR(kUSBVendorID), &device->vendor) &&
                    get_number (usb_device, CFSTR(kUSBProductID), &device->product) &&
                    get_string (object, CFSTR(kIOCalloutDeviceKey), device->path, sizeof (device->path)) &&
-                   get_string (usb_device, CFSTR(kUSBProductString), device->name, sizeof (device->name)) &&
+                   (get_string (usb_device, CFSTR("kUSBProductString"), device->name, sizeof (device->name)) ||
+                    get_string (usb_device, CFSTR(kUSBProductString), device->name, sizeof (device->name))) &&
                    get_string (usb_device, CFSTR(kUSBSerialNumberString), serial_string, sizeof (serial_string))) {
                        device->serial = atoi(serial_string);
                        IOObjectRelease(object);