OK, I've cleaned up my code some, and my patch is attached. The major categories of error are:

IRIX needs math.h, not cmath
IRIX needs strjmp.h, not cstrjmp
MIPSpro doesn't like "sgi" as an identifier

Also, _autosetup creates a few (2-3) makefiles that have ln with one argument, and these have to be tweaked by hand whenever gmake hits them and errors out.

There are still a few mysteries, since building without Mesa resulted in a working build (with warnings), and with Mesa results in a build that runs, but reports 0 CPUs and no memory.

   -Matt


diff -urnp boinc/api/gutil.cpp boinc-patched/api/gutil.cpp
*** boinc/api/gutil.cpp Wed Apr 29 08:11:37 2009
--- boinc-patched/api/gutil.cpp Thu Apr 30 09:50:12 2009
***************
*** 24,31 ****
  #include <cstdio>
  #include <cstdlib>
  #include <cstring>
! #include <cmath>
! #include <csetjmp>
  
  #ifdef _WIN32
  
--- 24,31 ----
  #include <cstdio>
  #include <cstdlib>
  #include <cstring>
! #include <math.h>
! #include <setjmp.h>
  
  #ifdef _WIN32
  
diff -urnp boinc/api/gutil_text.cpp boinc-patched/api/gutil_text.cpp
*** boinc/api/gutil_text.cpp    Wed Apr 29 08:11:37 2009
--- boinc-patched/api/gutil_text.cpp    Thu Apr 30 09:49:26 2009
***************
*** 26,32 ****
  #include <cstdio>
  #include <cstdlib>
  #include <cstring>
! #include <cmath>
  #include <csetjmp>
  
  using std::size_t;
--- 26,32 ----
  #include <cstdio>
  #include <cstdlib>
  #include <cstring>
! #include <math.h>
  #include <csetjmp>
  
  using std::size_t;
diff -urnp boinc/client/boinc_cmd.cpp boinc-patched/client/boinc_cmd.cpp
*** boinc/client/boinc_cmd.cpp  Wed Apr 29 08:07:02 2009
--- boinc-patched/client/boinc_cmd.cpp  Thu Apr 30 10:08:05 2009
*************** int main(int argc, char** argv) {
*** 226,234 ****
          retval = rpc.get_project_status(ps);
          if (!retval) ps.print();
      } else if (!strcmp(cmd, "--get_simple_gui_info")) {
!         SIMPLE_GUI_INFO sgi;
!         retval = rpc.get_simple_gui_info(sgi);
!         if (!retval) sgi.print();
      } else if (!strcmp(cmd, "--get_disk_usage")) {
          DISK_USAGE du;
          retval = rpc.get_disk_usage(du);
--- 226,234 ----
          retval = rpc.get_project_status(ps);
          if (!retval) ps.print();
      } else if (!strcmp(cmd, "--get_simple_gui_info")) {
!         SIMPLE_GUI_INFO info;
!         retval = rpc.get_simple_gui_info(info);
!         if (!retval) info.print();
      } else if (!strcmp(cmd, "--get_disk_usage")) {
          DISK_USAGE du;
          retval = rpc.get_disk_usage(du);
diff -urnp boinc/client/hostinfo_unix.cpp boinc-patched/client/hostinfo_unix.cpp
*** boinc/client/hostinfo_unix.cpp      Wed Apr 29 08:07:03 2009
--- boinc-patched/client/hostinfo_unix.cpp      Thu Apr 30 09:37:20 2009
*************** int HOST_INFO::get_host_info() {
*** 705,718 ****
      size_t len;
  
      // Get machine
!     mib[0] = CTL_HW;
!     mib[1] = HW_MACHINE;
      len = sizeof(p_vendor);
      sysctl(mib, 2, &p_vendor, &len, NULL, 0);
  
      // Get model
!     mib[0] = CTL_HW;
!     mib[1] = HW_MODEL;
      len = sizeof(p_model);
      sysctl(mib, 2, &p_model, &len, NULL, 0);
  #elif defined(__osf__)
--- 705,718 ----
      size_t len;
  
      // Get machine
!     mib[0] = 0;
!     mib[1] = 1;
      len = sizeof(p_vendor);
      sysctl(mib, 2, &p_vendor, &len, NULL, 0);
  
      // Get model
!     mib[0] = 0;
!     mib[1] = 1;
      len = sizeof(p_model);
      sysctl(mib, 2, &p_model, &len, NULL, 0);
  #elif defined(__osf__)
diff -urnp boinc/client/whetstone.cpp boinc-patched/client/whetstone.cpp
*** boinc/client/whetstone.cpp  Wed Apr 29 08:07:02 2009
--- boinc-patched/client/whetstone.cpp  Thu Apr 30 09:37:24 2009
***************
*** 29,35 ****
  #include <cstdlib>
  #include <cstdio>
  #include <cstring>
! #include <cmath>
  #include <ctime>
  #endif
  
--- 29,35 ----
  #include <cstdlib>
  #include <cstdio>
  #include <cstring>
! #include <math.h>
  #include <ctime>
  #endif
  
diff -urnp boinc/lib/diagnostics.h boinc-patched/lib/diagnostics.h
*** boinc/lib/diagnostics.h     Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/diagnostics.h     Thu Apr 30 09:37:27 2009
*************** extern void set_signal_exit_code(int);
*** 187,193 ****
  #else  // _DEBUG
  
  #define BOINCASSERT(expr)         
- #define BOINCTRACE(...)          
  
  #endif // _DEBUG
  
--- 187,192 ----
diff -urnp boinc/lib/gui_rpc_client.cpp boinc-patched/lib/gui_rpc_client.cpp
*** boinc/lib/gui_rpc_client.cpp        Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/gui_rpc_client.cpp        Thu Apr 30 09:37:31 2009
*************** int RPC_CLIENT::init_asynch(
*** 147,153 ****
  
  int RPC_CLIENT::init_poll() {
      fd_set read_fds, write_fds, error_fds;
-     struct timeval tv;
      int retval;
  
      FD_ZERO(&read_fds);
--- 147,152 ----
*************** int RPC_CLIENT::init_poll() {
*** 160,167 ****
  
      BOINCTRACE("init_poll(): sock = %d\n", sock);
  
!     tv.tv_sec = tv.tv_usec = 0;
!     select(FD_SETSIZE, &read_fds, &write_fds, &error_fds, &tv);
      retval = 0;
      if (FD_ISSET(sock, &error_fds)) {
          retval =  ERR_CONNECT;
--- 159,165 ----
  
      BOINCTRACE("init_poll(): sock = %d\n", sock);
  
!     select(FD_SETSIZE, &read_fds, &write_fds, &error_fds, 0);
      retval = 0;
      if (FD_ISSET(sock, &error_fds)) {
          retval =  ERR_CONNECT;
diff -urnp boinc/lib/gui_rpc_client.h boinc-patched/lib/gui_rpc_client.h
*** boinc/lib/gui_rpc_client.h  Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/gui_rpc_client.h  Thu Apr 30 09:37:36 2009
*************** extern locale_t uselocale(locale_t) __at
*** 725,731 ****
  
  #else
  #ifndef _WIN32
! #include <xlocale.h>
  #endif
  
   struct SET_LOCALE {
--- 725,731 ----
  
  #else
  #ifndef _WIN32
! #include <X11/Xlocale.h>
  #endif
  
   struct SET_LOCALE {
diff -urnp boinc/lib/gui_rpc_client_ops.cpp 
boinc-patched/lib/gui_rpc_client_ops.cpp
*** boinc/lib/gui_rpc_client_ops.cpp    Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/gui_rpc_client_ops.cpp    Thu Apr 30 09:37:46 2009
*************** int RPC_CLIENT::get_file_transfers(FILE_
*** 1210,1223 ****
      return retval;
  }
  
! int RPC_CLIENT::get_simple_gui_info(SIMPLE_GUI_INFO& sgi) {
      int retval;
      SET_LOCALE sl;
      char buf[256];
      RPC rpc(this);
  
!     sgi.projects.clear();
!     sgi.results.clear();
  
      retval = rpc.do_rpc("<get_simple_gui_info/>\n");
      if (!retval) {
--- 1210,1223 ----
      return retval;
  }
  
! int RPC_CLIENT::get_simple_gui_info(SIMPLE_GUI_INFO& info) {
      int retval;
      SET_LOCALE sl;
      char buf[256];
      RPC rpc(this);
  
!     info.projects.clear();
!     info.results.clear();
  
      retval = rpc.do_rpc("<get_simple_gui_info/>\n");
      if (!retval) {
*************** int RPC_CLIENT::get_simple_gui_info(SIMP
*** 1226,1238 ****
              else if (match_tag(buf, "<project>")) {
                  PROJECT* project = new PROJECT();
                  project->parse(rpc.fin);
!                 sgi.projects.push_back(project);
                  continue;
              }
              else if (match_tag(buf, "<result>")) {
                  RESULT* result = new RESULT();
                  result->parse(rpc.fin);
!                 sgi.results.push_back(result);
                  continue;
              }
          }
--- 1226,1238 ----
              else if (match_tag(buf, "<project>")) {
                  PROJECT* project = new PROJECT();
                  project->parse(rpc.fin);
!                 info.projects.push_back(project);
                  continue;
              }
              else if (match_tag(buf, "<result>")) {
                  RESULT* result = new RESULT();
                  result->parse(rpc.fin);
!                 info.results.push_back(result);
                  continue;
              }
          }
diff -urnp boinc/lib/mac_address.cpp boinc-patched/lib/mac_address.cpp
*** boinc/lib/mac_address.cpp   Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/mac_address.cpp   Thu Apr 30 09:42:10 2009
*************** get_mac_addresses(char* addresses) {
*** 264,270 ****
          strcat(addresses, delimiter);
          delimiter[0] = ':';
          delimiter[1] = '\0';
-         strcat(addresses, ether_ntoa(hw_addr));
      }
  
      return true;
--- 264,269 ----
diff -urnp boinc/lib/str_util.cpp boinc-patched/lib/str_util.cpp
*** boinc/lib/str_util.cpp      Wed Apr 29 08:10:10 2009
--- boinc-patched/lib/str_util.cpp      Thu Apr 30 09:42:22 2009
***************
*** 25,31 ****
  #ifndef _WIN32
  #include "config.h"
  #include <string>
! #include <cmath>
  #include <cstring>
  #include <cstdlib>
  #include <cctype>
--- 25,31 ----
  #ifndef _WIN32
  #include "config.h"
  #include <string>
! #include <math.h>
  #include <cstring>
  #include <cstdlib>
  #include <cctype>
diff -urnp boinc/zip/unzip/extract.c boinc-patched/zip/unzip/extract.c
*** boinc/zip/unzip/extract.c   Wed Apr 29 08:11:10 2009
--- boinc-patched/zip/unzip/extract.c   Thu Apr 30 09:43:17 2009
*************** static ZCONST char Far NotEnoughMem[] = 
*** 218,225 ****
  static ZCONST char Far InvalidComprData[] = "invalid compressed data to ";
  static ZCONST char Far Inflate[] = "inflate_boinc";
  
- extern int inflate_boinc(__G__ is_defl64);
- 
  #ifndef SFX
     static ZCONST char Far Explode[] = "explode";
  #ifndef LZW_CLEAN
--- 218,223 ----
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to