From ca904e43347e2004514c813aef975118fae1fdfc Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Wed, 18 Aug 2010 23:20:18 +0200 Subject: portable mode enabled in runtime --- src/common/portable.c | 14 ++++++++++++++ src/common/portable.h | 1 + src/makeinc.mak | 6 +----- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 src/common/portable.c create mode 100644 src/common/portable.h (limited to 'src') diff --git a/src/common/portable.c b/src/common/portable.c new file mode 100644 index 00000000..dcc0fba1 --- /dev/null +++ b/src/common/portable.c @@ -0,0 +1,14 @@ +#include + +int +portable_mode () +{ + if ((_access( "portable-mode", 0 )) != -1) + { + return 1; + } + else + { + return 0; + } +} diff --git a/src/common/portable.h b/src/common/portable.h new file mode 100644 index 00000000..bd40b24d --- /dev/null +++ b/src/common/portable.h @@ -0,0 +1 @@ +int portable_mode (); diff --git a/src/makeinc.mak b/src/makeinc.mak index 1b912364..753d88b3 100644 --- a/src/makeinc.mak +++ b/src/makeinc.mak @@ -1,5 +1,4 @@ #X64 = YES -#PORTABLE = YES IPV6 = YES CC = cl @@ -65,10 +64,6 @@ PYTHONOUTPUT = xcpython.dll TCLLIB = tcl85 TCLOUTPUT = xctcl.dll -!ifdef PORTABLE -CFLAGS = $(CFLAGS) -DPORTABLE_BUILD -!endif - !ifdef IPV6 CFLAGS = $(CFLAGS) -DUSE_IPV6 LIBS = $(LIBS) ws2_32.lib @@ -90,6 +85,7 @@ notify.obj \ outbound.obj \ plugin.obj \ plugin-timer.obj \ +portable.obj \ proto-irc.obj \ server.obj \ servlist.obj \ -- cgit 1.4.1