From ee012c8a933b6283872a6dd799b955b769986a40 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Thu, 27 Mar 2008 09:48:06 +0100 Subject: [PATCH] Fix MaxOS X support --- modbus/modbus.c | 4 ++-- modbus/modbus.h | 2 +- wscript | 6 ------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modbus/modbus.c b/modbus/modbus.c index eb30004..e4f8675 100644 --- a/modbus/modbus.c +++ b/modbus/modbus.c @@ -50,9 +50,9 @@ #include "modbus.h" -#ifdef SYS_PLATFORM_DARWIN +#ifdef __APPLE_CC__ #include - #define SOL_CTP getprotobyname("TCP")->p_proto + #define SOL_TCP getprotobyname("TCP")->p_proto #endif #define UNKNOWN_ERROR_MSG "Not defined in modbus specification" diff --git a/modbus/modbus.h b/modbus/modbus.h index 84637c7..a640292 100644 --- a/modbus/modbus.h +++ b/modbus/modbus.h @@ -120,7 +120,7 @@ typedef struct { was bigger than 19 bytes. Making it 67 bytes for now, but OS X does support 256 byte file names. May become a problem in the future. */ -#ifdef SYS_PLATFORM_DARWIN +#ifdef __APPLE_CC__ char device[67]; #else char device[19]; diff --git a/wscript b/wscript index 25b7e0d..a54c0af 100644 --- a/wscript +++ b/wscript @@ -45,12 +45,6 @@ def configure(conf): conf.define('VERSION', VERSION) conf.define('PACKAGE', 'libmodbus') - import sys - if sys.platform[:6] == 'darwin': - print "Darwin platform detected" - conf.env.append_value('CCFLAGS', '-DPLATFORM_DARWIN') - conf.define('PLATFORM_DARWIN', '1') - conf.write_config_header() def build(bld): -- libgit2 0.21.4