From: Eric E. <er...@ti...> - 2004-06-10 16:00:57
|
A few minor patches.. The first clones strndup() which is a GNU extension and not always available. The second two patch the configure.in's of the daemon and the qt-gui, in where they set some SPARC-specific gcc flags which fail on x86. --- msn/configure.in.orig Thu Jun 10 11:16:54 2004 +++ msn/configure.in Thu Jun 10 11:03:17 2004 @@ -43,7 +43,7 @@ LICQ_CHECK_LICQ dnl Checks for library functions. -AC_CHECK_FUNCS(inet_addr inet_aton strerror) +AC_CHECK_FUNCS(inet_addr inet_aton strerror strndup) dnl Switch to C++ mode and check for needed C++ headers AC_LANG_SAVE --- msn/src/msn.cpp.orig Thu Jun 10 10:45:24 2004 +++ msn/src/msn.cpp Thu Jun 10 11:15:39 2004 @@ -16,6 +16,10 @@ // written by Jon Keating <jo...@li...> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "msn.h" #include "msnpacket.h" #include "licq_log.h" @@ -29,6 +33,28 @@ using namespace std; +#ifndef HAVE_STRNDUP + +#include <stdlib.h> + +char *strndup(const char *s, size_t n) +{ + char *str; + + if (n < 1) + return NULL; + + str = (char *)malloc(n + 1); + if (!str) + return NULL; + + memset(str, '\0', n + 1); + strncpy(str, s, n); + + return str; +} +#endif // HAVE_STRNDUP + //Global socket manager CSocketManager gSocketMan; --- licq/configure.in.orig Thu Jun 10 11:24:17 2004 +++ licq/configure.in Thu Jun 10 11:38:19 2004 @@ -57,7 +57,9 @@ ;; *-*-solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DPIC -fPIC" - LDFLAGS="$LDFLAGS -mimpure-text" + if test "$host_cpu" = "sparc"; then + LDFLAGS="$LDFLAGS -mimpure-text" + fi echo "Setting Solaris compilation options" ;; *-*-linux*) --- qt-gui/configure.in.orig Thu Jun 10 11:45:18 2004 +++ qt-gui/configure.in Thu Jun 10 11:45:21 2004 @@ -42,7 +42,9 @@ ;; *-*-solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DPIC -fPIC" - LDFLAGS="$LDFLAGS -mimpure-text" + if test "$host_cpu" = "sparc"; then + LDFLAGS="$LDFLAGS -mimpure-text" + fi echo "Setting Solaris compilation options" ;; *-*-linux*) -- Eric Enright /"\ ericAtiptsoftDcom \ / ASCII Ribbon Campaign X Against HTML E-Mail Public Key: 0xBEDF636F / \ |