Apply this after configure. This patch addresses following problems: * No rpl_{re|m}alloc(3) emulation needed and it's provided neither * doesn't exist on IRIX * statfs(2) has different API, use statvfs(2) instead * setenv(3) doesn't exist on IRIX, emulate it using putenv(3) * Old make doesn't support order-only prerequisites * Underquoted shell variables (VER_GIT, VER_FILE) in Makefile diff -Naur centerim-4.22.5/config.h centerim-4.22.5-irix/config.h --- centerim-4.22.5/config.h Wed Apr 30 21:50:20 2008 +++ centerim-4.22.5-irix/config.h Wed Apr 30 18:06:37 2008 @@ -758,7 +758,7 @@ #endif /* Define to rpl_malloc if the replacement function should be used. */ -#define malloc rpl_malloc +/*#define malloc rpl_malloc*/ /* Define to `int' if does not define. */ /* #undef pid_t */ @@ -768,7 +768,7 @@ /* #undef ptrdiff_t */ /* Define to rpl_realloc if the replacement function should be used. */ -#define realloc rpl_realloc +/*#define realloc rpl_realloc */ /* Define to equivalent of C99 restrict keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ diff -Naur centerim-4.22.5/kkconsui/src/texteditor.cc centerim-4.22.5-irix/kkconsui/src/texteditor.cc --- centerim-4.22.5/kkconsui/src/texteditor.cc Tue Apr 08 19:51:08 2008 +++ centerim-4.22.5-irix/kkconsui/src/texteditor.cc Wed Apr 30 14:55:16 2008 @@ -43,7 +43,7 @@ * */ -#include /* for intptr_t */ +/*#include */ /* for intptr_t */ #include "texteditor.h" diff -Naur centerim-4.22.5/kkstrtext/kkstrtext.cc centerim-4.22.5-irix/kkstrtext/kkstrtext.cc --- centerim-4.22.5/kkstrtext/kkstrtext.cc Tue Apr 08 19:51:09 2008 +++ centerim-4.22.5-irix/kkstrtext/kkstrtext.cc Wed Apr 30 14:52:24 2008 @@ -24,7 +24,7 @@ #include "kkstrtext.h" #include -#include /* for intptr_t */ +/*#include */ /* for intptr_t */ char *strcut(char *strin, int frompos, int count) { if(count > 0) { diff -Naur centerim-4.22.5/src/icqconf.cc centerim-4.22.5-irix/src/icqconf.cc --- centerim-4.22.5/src/icqconf.cc Tue Apr 08 19:51:09 2008 +++ centerim-4.22.5-irix/src/icqconf.cc Wed Apr 30 17:16:01 2008 @@ -27,7 +27,7 @@ #include #include -#if defined(__sun__) || defined(__NetBSD__) +#if defined(__sun__) || defined(__NetBSD__) || defined(__sgi__) #include #endif @@ -1735,7 +1735,7 @@ void icqconf::checkdiskspace() { fenoughdiskspace = true; -#if !(defined(__sun__) || defined(__NetBSD__)) +#if !(defined(__sun__) || defined(__NetBSD__) || defined(__sgi__)) struct statfs st; if(!statfs(conf.getdirname().c_str(), &st)) { #else diff -Naur centerim-4.22.5/src/icqdialogs.cc centerim-4.22.5-irix/src/icqdialogs.cc --- centerim-4.22.5/src/icqdialogs.cc Tue Apr 08 19:51:09 2008 +++ centerim-4.22.5-irix/src/icqdialogs.cc Wed Apr 30 15:52:09 2008 @@ -34,7 +34,7 @@ #include "impgp.h" #include -#include /* for intptr_t */ +/*#include *//* for intptr_t */ const char *stragerange(ICQ2000::AgeRange r) { switch(r) { diff -Naur centerim-4.22.5/src/icqface.cc centerim-4.22.5-irix/src/icqface.cc --- centerim-4.22.5/src/icqface.cc Tue Apr 08 19:51:09 2008 +++ centerim-4.22.5-irix/src/icqface.cc Wed Apr 30 17:28:47 2008 @@ -22,7 +22,7 @@ * */ -#include /* for intptr_t */ +/*#include */ /* for intptr_t */ #include "icqface.h" #include "icqconf.h" diff -Naur centerim-4.22.5/src/imexternal.cc centerim-4.22.5-irix/src/imexternal.cc --- centerim-4.22.5/src/imexternal.cc Tue Apr 08 19:51:09 2008 +++ centerim-4.22.5-irix/src/imexternal.cc Wed Apr 30 16:41:05 2008 @@ -252,6 +252,21 @@ } } +/* Emulation for IRIX which has no setenv(3)*/ +#include +#include +#include +int setenv(const char *name, const char *value, const int overwrite) { + char *buffer = NULL; + int size = strlen(name) + strlen(value) + 2; + if ((buffer = (char*)calloc(size, sizeof(char)))) { + snprintf(buffer, size, "%s=%s", name, value); + return putenv(buffer); + } + return -1; +} + + int imexternal::action::execscript() { int inpipe[2], outpipe[2], pid; string text; diff -Naur centerim-4.22.5/src/Makefile centerim-4.22.5-irix/src/Makefile --- centerim-4.22.5/src/Makefile Wed Apr 30 21:50:18 2008 +++ centerim-4.22.5-irix/src/Makefile Wed Apr 30 17:50:47 2008 @@ -1064,13 +1064,13 @@ uninstall-binPROGRAMS -$(centerim_OBJECTS) git-version.h : | git_version +$(centerim_OBJECTS) git-version.h : git_version .PHONY: git_version git_version: git-version.h.in VER_FILE=`$(g_get_cur)` || true; \ VER_GIT=`cd $(top_srcdir); ./misc/git-version-gen .version`; \ - if [ -z $$VER_FILE ] || [ $$VER_FILE != $$VER_GIT ]; then \ + if [ -z "$$VER_FILE" ] || [ "$$VER_FILE" != "$$VER_GIT" ]; then \ $(g_subst_f); \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables.