From 013d0d2773c600b004baafcc487f1140a85316e1 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 29 Aug 2011 14:02:39 +0200 Subject: [PATCH 1/2] Drop @DEFS@ from the build system This will only ever be set to -DHAVE_CONFIG_H. However, we shouldn't give this flag to other people's code (e.g. through znc-config). Since we don't need it, it's best to just drop it completely. Signed-off-by: Uli Schlachter --- Makefile.in | 2 +- modules/Makefile.in | 2 +- test/Makefile.in | 2 +- znc-config.in | 2 +- znc-uninstalled.pc.in | 3 +-- znc.pc.in | 3 +-- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index b4001efe..c6064159 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ includedir := @includedir@ sbindir := @sbindir@ localstatedir := @localstatedir@ CXX := @CXX@ -CXXFLAGS := @DEFS@ @CPPFLAGS@ @CXXFLAGS@ -I. +CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I. LDFLAGS := @LDFLAGS@ LIBS := @LIBS@ LIBZNC := @LIBZNC@ diff --git a/modules/Makefile.in b/modules/Makefile.in index 0ace6015..87868b05 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -17,7 +17,7 @@ sbindir := @sbindir@ localstatedir := @localstatedir@ CXX := @CXX@ # CXXFLAGS are for the main binary, so don't use them here, use MODFLAGS instead -MODFLAGS := @DEFS@ @CPPFLAGS@ @MODFLAGS@ -I$(srcdir)/.. -I.. +MODFLAGS := @CPPFLAGS@ @MODFLAGS@ -I$(srcdir)/.. -I.. MODLINK := @MODLINK@ LDFLAGS := @LDFLAGS@ # LIBS are not and should not be used in here. diff --git a/test/Makefile.in b/test/Makefile.in index 89a19f4d..6e377c60 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -5,7 +5,7 @@ srcdir := @srcdir@ VPATH := @srcdir@ CXX := @CXX@ -CXXFLAGS := @DEFS@ @CPPFLAGS@ @CXXFLAGS@ -I.. +CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I.. LDFLAGS := @LDFLAGS@ LIBS := @LIBS@ diff --git a/znc-config.in b/znc-config.in index 1bb3f798..9454e18d 100755 --- a/znc-config.in +++ b/znc-config.in @@ -7,7 +7,7 @@ bindir="@bindir@" datadir="@datadir@" CXX="@CXX@" -CXXFLAGS="@DEFS@ @CPPFLAGS@ @MODFLAGS@ -I@prefix@/include/znc" +CXXFLAGS="@CPPFLAGS@ @MODFLAGS@ -I@prefix@/include/znc" MODLINK="@MODLINK@" # LIBS="@LIBS@" # No libs needed, ZNC links against $LIBS and thus modules don't need to. diff --git a/znc-uninstalled.pc.in b/znc-uninstalled.pc.in index 6e0f9ade..73570abb 100644 --- a/znc-uninstalled.pc.in +++ b/znc-uninstalled.pc.in @@ -7,7 +7,6 @@ datadir=@datadir@ includedir=@includedir@ cxx=@CXX@ -DEFS=@DEFS@ CPPFLAGS=@CPPFLAGS@ MODFLAGS=@MODFLAGS@ version=@PACKAGE_VERSION@ @@ -23,4 +22,4 @@ Name: ZNC Description: An advanced IRC proxy Version: ${version} URL: http://znc.in -Cflags: ${DEFS} ${CPPFLAGS} ${MODFLAGS} ${INC_PATH} +Cflags: ${CPPFLAGS} ${MODFLAGS} ${INC_PATH} diff --git a/znc.pc.in b/znc.pc.in index 88c6f614..c4588bea 100644 --- a/znc.pc.in +++ b/znc.pc.in @@ -7,7 +7,6 @@ datadir=@datadir@ includedir=@includedir@ cxx=@CXX@ -DEFS=@DEFS@ CPPFLAGS=@CPPFLAGS@ MODFLAGS=@MODFLAGS@ version=@PACKAGE_VERSION@ @@ -21,4 +20,4 @@ Name: ZNC Description: An advanced IRC proxy Version: ${version} URL: http://znc.in -Cflags: ${DEFS} ${CPPFLAGS} ${MODFLAGS} ${INC_PATH} +Cflags: ${CPPFLAGS} ${MODFLAGS} ${INC_PATH} From ce5d73c9cd33ff2c280b6b2f58d29b22f41ba45d Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 29 Aug 2011 14:10:45 +0200 Subject: [PATCH 2/2] admin: Fix getchan {inconfig,keepbuffer,detached} Instead of giving a useful result, they returned their result by sometimes omitting the first character of the option name. Whoops. Signed-off-by: Uli Schlachter --- modules/admin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/admin.cpp b/modules/admin.cpp index 8ccbd13f..94d2b43e 100644 --- a/modules/admin.cpp +++ b/modules/admin.cpp @@ -356,11 +356,11 @@ class CAdminMod : public CModule { else if (sVar == "buffer") PutModule("Buffer = " + CString(pChan->GetBufferCount())); else if (sVar == "inconfig") - PutModule("InConfig = " + pChan->InConfig()); + PutModule("InConfig = " + CString(pChan->InConfig())); else if (sVar == "keepbuffer") - PutModule("KeepBuffer = " + pChan->KeepBuffer()); + PutModule("KeepBuffer = " + CString(pChan->KeepBuffer())); else if (sVar == "detached") - PutModule("Detached = " + pChan->IsDetached()); + PutModule("Detached = " + CString(pChan->IsDetached())); else if (sVar == "key") PutModule("Key = " + pChan->GetKey()); else