pkg-config libdivecomputer / subsurface makefile / confusion

Grischa Toedt toedt at embl.de
Tue Jul 10 15:28:01 PDT 2012


A final remark, you also have to apply Pascal Manchons "Fix some ioctl calls on 64bit Mac OS X." on libdivecomputer master, to be able to import dives on Mac OS X.

diff --git a/src/serial_posix.c b/src/serial_posix.c
index f1807ba..cf13abf 100644
--- a/src/serial_posix.c
+++ b/src/serial_posix.c
@@ -664,7 +664,7 @@
 	if (device == NULL)
 		return -1; // EINVAL (Invalid argument)
 
-	int action = (level ? TIOCSBRK : TIOCCBRK);
+	unsigned long action = (level ? TIOCSBRK : TIOCCBRK);
 
 	if (ioctl (device->fd, action, NULL) != 0) {
 		TRACE ("ioctl");
@@ -678,7 +678,7 @@
 static int
 serial_set_status (int fd, int value, int level)
 {
-	int action = (level ? TIOCMBIS : TIOCMBIC);
+	unsigned long action = (level ? TIOCMBIS : TIOCMBIC);
 
 	if (ioctl (fd, action, &value) != 0) {
 		TRACE ("ioctl");



Grischa


On Jul 10, 2012, at 9:34 PM, Linus Torvalds wrote:

> On Tue, Jul 10, 2012 at 12:00 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
>> 
>> The problem is that the libdivecomputer pkg-config file used to contain:
>> 
>> -I${includedir}/libdivecomputer
>> 
>> and applications can then include the header files like this:
>> 
>> #include <header.h>
>> 
>> But I changed the pkg-config file some time ago to contain only:
>> 
>> -I${includedir}
>> 
>> and applications now have to include the header files like this:
>> 
>> #include <libdivecomputer/header.h>
>> 
>> I did this because I believe the second style is better. It does avoid
>> trouble if an application uses two independent libraries that both have a
>> header file installed with the same header.h name.
> 
> Ok. Using <libdivecomputer/*.h> sounds like a good thing, so I'll just
> fix up subsurface to the new model. It only compiles against recent
> versions of libdivecomputer anyway, so I don't think there's any worry
> about having to try to be backwards compatible.
> 
> Pushed out. It works on Linux. Grischa - can you check whether the
> current -git tree now compiles cleanly on OS X too?
> 
>               Linus

-- 
Dr. Grischa Tödt



More information about the subsurface mailing list