[distcc] Distcc patches for Stratus VOS

Green, Paul Paul.Green at stratus.com
Sat May 17 21:48:29 GMT 2003


The attached patch, which I have tested against Stratus VOS 14.6, doesn't
quite get us all the way to success, but it comes pretty close. We are
missing the hstrerror function, which I'm about to code up. (The build farm
also gets confused by the types.h that is in distcc vs. the types.h that is
shipped with our C compiler, but that is an artifact of the VOS build
environment, and I'm trying to fix it locally).

I hope you can evaluate it and apply it to the master copy.

Thanks
PG
--
Paul Green, Senior Technical Consultant,
Stratus Technologies, Maynard, MA USA
Voice: +1 978-461-7557; FAX: +1 978-461-3610
Speaking from Stratus not for Stratus


-------------- next part --------------
diff -urpN old/distcc/Makefile.in new/distcc/Makefile.in
--- old/distcc/Makefile.in	Sat May 17 17:30:46 2003
+++ new/distcc/Makefile.in	Sat May 17 17:30:47 2003
@@ -34,6 +34,7 @@ LDFLAGS = @LDFLAGS@
 CC = @CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@ ${DIR_DEFS}
+EXEEXT = @EXEEXT@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -228,10 +229,18 @@ popt_HEADERS = popt/findme.h popt/popt.h
 # Package maintainers can override this if absolutely necessary, but I
 # would prefer that they do not. -- mbp
 
-bin_PROGRAMS = distcc distccd
-
-check_PROGRAMS = h_exten h_issource h_scanargs h_hosts h_argvtostr	\
-	h_strip h_parsemask
+bin_PROGRAMS = \
+	distcc$(EXEEXT) \
+	distccd$(EXEEXT)
+
+check_PROGRAMS = \
+	h_exten$(EXEEXT) \
+	h_issource$(EXEEXT) \
+	h_scanargs$(EXEEXT) \
+	h_hosts$(EXEEXT) \
+	h_argvtostr$(EXEEXT) \
+	h_strip$(EXEEXT) \
+	h_parsemask$(EXEEXT)
 
 ## OVERALL targets
 
@@ -253,7 +262,7 @@ check_PROGRAMS = h_exten h_issource h_sc
 # We don't build the web pages or manual by default, because many
 # people will not have the tools to do it.  Just use all-web or
 # all-linuxdoc if you want them.
-all: $(bin_PROGRAMS) $(sbin_PROGRAMS)
+all: $(bin_PROGRAMS)
 
 all-web: all-latte
 all-latte: $(latte_HTML)
@@ -264,31 +273,31 @@ all-linuxdoc: linuxdoc/html/distcc.html 
 
 ## BUILD targets
 
-distcc: $(distcc_obj)
+distcc$(EXEEXT): $(distcc_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)
 
-distccd: $(distccd_obj)
+distccd$(EXEEXT): $(distccd_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	
 
-h_exten: $(h_exten_obj)
+h_exten$(EXEEXT): $(h_exten_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_exten_obj) $(LIBS)
 
-h_issource: $(h_issource_obj)
+h_issource$(EXEEXT): $(h_issource_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_issource_obj) $(LIBS)
 
-h_scanargs: $(h_scanargs_obj)
+h_scanargs$(EXEEXT): $(h_scanargs_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_scanargs_obj) $(LIBS)
 
-h_hosts: $(h_hosts_obj)
+h_hosts$(EXEEXT): $(h_hosts_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_hosts_obj) $(LIBS)
 
-h_argvtostr: $(h_argvtostr_obj)
+h_argvtostr$(EXEEXT): $(h_argvtostr_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_argvtostr_obj) $(LIBS)
 
-h_parsemask: $(h_parsemask_obj)
+h_parsemask$(EXEEXT): $(h_parsemask_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_parsemask_obj) $(LIBS)
 
-h_strip: $(h_strip_obj)
+h_strip$(EXEEXT): $(h_strip_obj)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_strip_obj) $(LIBS)
 
 
@@ -356,7 +365,7 @@ $(latte_HTML): web/style.latte
 ######################################################################
 ## CHECK targets
 
-check_programs: $(check_PROGRAMS) $(bin_PROGRAMS) $(sbin_PROGRAMS)
+check_programs: $(check_PROGRAMS) $(bin_PROGRAMS)
 
 check: check_programs
 	if test x$(PYTHON) != x; then \
diff -urpN old/distcc/src/ncpus.c new/distcc/src/ncpus.c
--- old/distcc/src/ncpus.c	Wed May  7 18:33:45 2003
+++ new/distcc/src/ncpus.c	Wed May  7 07:36:59 2003
@@ -64,6 +64,32 @@ int dcc_ncpus(int *ncpus)
 }
 
 
+#elif defined(__VOS__)
+
+#ifdef __GNUC__
+#define $shortmap
+#endif
+
+#include <module_info.h>
+
+extern void s$get_module_info (char_varying *module_name, void *mip,
+          short int *code);
+
+int dcc_ncpus(int *ncpus)
+{
+short int code;
+module_info mi;
+char_varying(66) module_name;
+
+     strcpy_vstr_nstr (&module_name, "");
+     mi.version = MODULE_INFO_VERSION_1;
+     s$get_module_info ((char_varying *)&module_name, (void *)&mi, &code);
+     if (code != 0)
+          *ncpus = 1;    /* safe guess... */
+     else *ncpus = mi.n_user_cpus;
+     return 0;
+}
+
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
 
 /* http://www.FreeBSD.org/cgi/man.cgi?query=sysctl&sektion=3&manpath=FreeBSD+4.6-stable
diff -urpN old/distcc/src/types.h new/distcc/src/types.h
--- old/distcc/src/types.h	Mon Apr 28 21:30:56 2003
+++ new/distcc/src/types.h	Mon Apr 28 21:30:32 2003
@@ -21,10 +21,12 @@
  */
 
 #ifndef HAVE_SOCKLEN_T
+#define HAVE_SOCKLEN_T
 typedef size_t socklen_t;
 #endif
 
 #ifndef HAVE_IN_PORT_T
+#define HAVE_IN_PORT_T
 typedef int in_port_t;
 #endif
 
@@ -34,5 +36,6 @@ typedef int in_port_t;
  *
  * On Linux it is uint32.
  */
+#define HAVE_IN_ADDR_T
 typedef unsigned long in_addr_t;
 #endif
diff -urpN old/distcc/src/util.c new/distcc/src/util.c
--- old/distcc/src/util.c	Tue May  6 11:47:39 2003
+++ new/distcc/src/util.c	Tue May  6 11:47:39 2003
@@ -29,6 +29,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <signal.h>
+#include <netdb.h>
 
 #include <sys/stat.h>
 


More information about the distcc mailing list