Problems with libdivecomputer under OSX

Jef Driesen jefdriesen at telenet.be
Fri Jul 6 21:03:17 UTC 2012


On 07/06/2012 10:34 PM, Pascal Manchon wrote:
> I stumbled on that error previously, and I think it might come from a casting issue.
>
> In the file serial_posix.c, can you try replacing the first line of the function serial_set_status, which is :
>         int action = (level ? TIOCMBIS : TIOCMBIC);
> by :
>         unsigned long action = (level ? TIOCMBIS : TIOCMBIC);
>
> I think it should not break the function for other OS, but it might be worth some more thorough testing...

On my macosx setup (and Henrik confirmed it on a real installation), these 
constants are defined as:

#define TIOCMBIC _IOW('t', 107, int)
#define TIOCMBIS _IOW('t', 108, int)
#define TIOCM_DTR 0002

So that seems to indicate they are int's not long's. My linux manpages also 
confirms int. And the macosx references I could find, tell me the same:

https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man4/tty.4.html

Strange. Maybe there is some difference between 32bit and 64bit? My apps are 
32bit, and I suspect a native build will be 64bit. Can anyone try to build a 
32bit version on a native macosx?

Jef




More information about the Devel mailing list