Skip to content

Commit 410e83d

Browse files
committed
rename SOSC_NO_ZEROCONF to SOSC_ZEROCONF with positive logic
1 parent bd0af7a commit 410e83d

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ else()
176176
endif()
177177

178178
if(build_with_zeroconf)
179+
add_compile_definitions(SOSC_ZEROCONF)
179180
target_sources(serialosc-device PRIVATE src/serialosc-device/zeroconf/common.c)
180181

181182
if(LINUX)
@@ -188,7 +189,6 @@ if(build_with_zeroconf)
188189
target_sources(serialosc-device PRIVATE src/serialosc-device/zeroconf/windows.c)
189190
endif()
190191
else()
191-
add_compile_definitions(SOSC_NO_ZEROCONF)
192192
target_sources(serialosc-device PRIVATE src/serialosc-device/zeroconf/dummy.c)
193193
endif()
194194

include/serialosc/serialosc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <winsock2.h>
2121
#endif
2222

23-
#ifndef SOSC_NO_ZEROCONF
23+
#ifdef SOSC_ZEROCONF
2424
#include <dns_sd.h>
2525
#endif
2626

@@ -61,7 +61,7 @@ typedef struct sosc_state {
6161
int ipc_in_fd;
6262
int ipc_out_fd;
6363

64-
#ifndef SOSC_NO_ZEROCONF
64+
#ifdef SOSC_ZEROCONF
6565
DNSServiceRef ref;
6666
#endif
6767

src/serialosc-device/wscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ def build(ctx):
66
objs = []
77
obj = lambda src: objs.append(src)
88

9-
if ctx.env.SOSC_NO_ZEROCONF:
10-
obj('zeroconf/dummy.c')
11-
else:
9+
if ctx.env.SOSC_ZEROCONF:
1210
obj('zeroconf/common.c')
1311

1412
if ctx.env.DEST_OS[:3] == "win":
@@ -17,6 +15,8 @@ def build(ctx):
1715
obj('zeroconf/not_darwin.c')
1816
elif ctx.env.DEST_OS == 'darwin':
1917
obj('zeroconf/darwin.c')
18+
else:
19+
obj('zeroconf/dummy.c')
2020

2121
if ctx.env.DEST_OS[:3] == "win":
2222
obj('event_loop/windows.c')

wscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def configure(conf):
275275
conf.env.append_unique("CFLAGS", ["-mmacosx-version-min=10.13"])
276276
conf.env.append_unique("LINKFLAGS", ["-mmacosx-version-min=10.13"])
277277

278-
if conf.options.disable_zeroconf:
279-
conf.define("SOSC_NO_ZEROCONF", True)
280-
conf.env.SOSC_NO_ZEROCONF = True
278+
if not conf.options.disable_zeroconf:
279+
conf.define("SOSC_ZEROCONF", True)
280+
conf.env.SOSC_ZEROCONF = True
281281

282282

283283
if conf.options.enable_debug:

0 commit comments

Comments
 (0)