From b75acf6367400ff88428618719cefbbee648b0cb Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 22 Oct 2009 22:55:23 +0100 Subject: Don't include chat.h from bitlbee.h. make install-dev doesn't install chat.h and it shouldn't ... but things broke because bitlbee.h includes it. Fixes #534. --- account.c | 1 + bitlbee.h | 1 - chat.c | 1 + chat.h | 5 +++++ irc_commands.c | 1 + protocols/nogaim.h | 1 + root_commands.c | 1 + storage_xml.c | 1 + 8 files changed, 11 insertions(+), 1 deletion(-) diff --git a/account.c b/account.c index cb54731f..912cba6a 100644 --- a/account.c +++ b/account.c @@ -26,6 +26,7 @@ #define BITLBEE_CORE #include "bitlbee.h" #include "account.h" +#include "chat.h" account_t *account_add( irc_t *irc, struct prpl *prpl, char *user, char *pass ) { diff --git a/bitlbee.h b/bitlbee.h index cbda42cd..46a91419 100644 --- a/bitlbee.h +++ b/bitlbee.h @@ -128,7 +128,6 @@ #include "commands.h" #include "account.h" #include "nick.h" -#include "chat.h" #include "conf.h" #include "log.h" #include "ini.h" diff --git a/chat.c b/chat.c index 87c262b8..8c5ce0bc 100644 --- a/chat.c +++ b/chat.c @@ -24,6 +24,7 @@ */ #include "bitlbee.h" +#include "chat.h" struct chat *chat_add( irc_t *irc, account_t *acc, char *handle, char *channel ) { diff --git a/chat.h b/chat.h index 5aef745c..7196aea8 100644 --- a/chat.h +++ b/chat.h @@ -23,6 +23,9 @@ Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _CHAT_H +#define _CHAT_H + struct chat { account_t *acc; @@ -44,3 +47,5 @@ int chat_chancmp( char *a, char *b ); int chat_chanok( char *a ); int chat_join( irc_t *irc, struct chat *c, const char *password ); + +#endif diff --git a/irc_commands.c b/irc_commands.c index 044ff62c..74334ee9 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -26,6 +26,7 @@ #define BITLBEE_CORE #include "bitlbee.h" #include "ipc.h" +#include "chat.h" static void irc_cmd_pass( irc_t *irc, char **cmd ) { diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 1e5df503..ade8c23f 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -43,6 +43,7 @@ #include "proxy.h" #include "query.h" #include "md5.h" +#include "chat.h" #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ diff --git a/root_commands.c b/root_commands.c index 678ee143..5de616fb 100644 --- a/root_commands.c +++ b/root_commands.c @@ -28,6 +28,7 @@ #include "crypting.h" #include "bitlbee.h" #include "help.h" +#include "chat.h" #include diff --git a/storage_xml.c b/storage_xml.c index b78c3661..b6745c75 100644 --- a/storage_xml.c +++ b/storage_xml.c @@ -28,6 +28,7 @@ #include "base64.h" #include "arc.h" #include "md5.h" +#include "chat.h" #if GLIB_CHECK_VERSION(2,8,0) #include -- cgit v1.2.3 From 4cf80bb798a4159f42a904cb830b99c87a0ca8e0 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 23 Oct 2009 11:43:15 +0100 Subject: Shuffling a few more #includes. Much more shuffling will be needed. --- lib/misc.c | 1 + protocols/jabber/jabber.h | 3 ++- protocols/nogaim.c | 4 +++- protocols/nogaim.h | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/misc.c b/lib/misc.c index 9d504b75..35e9909b 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -45,6 +45,7 @@ #include #endif +#include "md5.h" #include "ssl_client.h" void strip_linefeed(gchar *text) diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index ee453144..1180d2b9 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -26,8 +26,9 @@ #include -#include "xmltree.h" #include "bitlbee.h" +#include "md5.h" +#include "xmltree.h" extern GSList *jabber_connections; diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 710b7645..21f7dcb1 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -32,9 +32,11 @@ */ #define BITLBEE_CORE -#include "nogaim.h" #include +#include "nogaim.h" +#include "chat.h" + static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); GSList *connections; diff --git a/protocols/nogaim.h b/protocols/nogaim.h index ade8c23f..dc6154e2 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -38,12 +38,12 @@ #ifndef _NOGAIM_H #define _NOGAIM_H +#include + #include "bitlbee.h" #include "account.h" #include "proxy.h" #include "query.h" -#include "md5.h" -#include "chat.h" #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ -- cgit v1.2.3 From fb51d85751b36098ad4271bc4553ade4dc53f20b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 24 Oct 2009 00:57:41 +0100 Subject: "chat add", not chat_add --- doc/user-guide/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user-guide/misc.xml b/doc/user-guide/misc.xml index 3102b8b0..68b44e95 100644 --- a/doc/user-guide/misc.xml +++ b/doc/user-guide/misc.xml @@ -76,7 +76,7 @@ Then, just use the ordinary IRC /invite command to invite m -Some protocols (like Jabber) also support named groupchats. BitlBee now supports these too. You can use the chat add command to join them. See help chat_add for more information. +Some protocols (like Jabber) also support named groupchats. BitlBee now supports these too. You can use the chat add command to join them. See help chat add for more information. -- cgit v1.2.3 From 36cf9fda6a5cc4bcbfe98319b48af636fa142590 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 12 Nov 2009 20:41:54 +0900 Subject: Proper detection of a usable libresolv.so or libresolv.a. glibc 2.9 and later are no longer retarded and support SRV record lookups without having to link against a static library. --- configure | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/configure b/configure index b3a98086..9d92cedf 100755 --- a/configure +++ b/configure @@ -266,7 +266,7 @@ EOF detect_ldap() { - TMPFILE=`mktemp` + TMPFILE=$(mktemp) if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then cat<>Makefile.settings EFLAGS+=-lldap @@ -281,6 +281,43 @@ EOF fi } +RESOLV_TESTCODE=' +#include +#include + +int main() +{ + ns_initparse( NULL, 0, NULL ); + ns_parserr( NULL, ns_s_an, 0, NULL ); +} +' + +detect_resolv_dynamic() +{ + echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -lresolv >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + echo 'EFLAGS+=-lresolv' >> Makefile.settings + return 0 + fi + + return 1 +} + +detect_resolv_static() +{ + for i in $systemlibdirs; do + if [ -f $i/libresolv.a ]; then + echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings + return 0 + fi + fi + done + + return 1 +} + if [ "$ssl" = "auto" ]; then detect_gnutls if [ "$ret" = "0" ]; then @@ -348,13 +385,9 @@ fi; echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings -for i in $systemlibdirs; do - if [ -f $i/libresolv.a ]; then - echo '#define HAVE_RESOLV_A' >> config.h - echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings - break - fi -done +if detect_resolv_dynamic || detect_resolv_static; then + echo '#define HAVE_RESOLV_A' >> config.h +fi STORAGES="text xml" -- cgit v1.2.3