summaryrefslogtreecommitdiff
path: root/src/srvrpc.c
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
committerCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
commitf1373cdf3c33752ec326c9b79378057367836c4c (patch)
tree23ff4c261920076e35ad67354f7e8385fdd7255d /src/srvrpc.c
parent4bf85961c09d34336f9b081cd923a9f59fcf5266 (diff)
downloaddistcc-git-f1373cdf3c33752ec326c9b79378057367836c4c.tar.gz
These changes are enough to get code to compile, and at least some of
the unittests to pass, on FreeBSD 6.0, Solaris 10 x86, and OS X Leopard. You have to use gmake instead of standard bsd make, though, because neither bsd nor solari make understand 'include */*.d' and 'CFLAGS += $(POPT_FLAGS).' These may be fixable later. Most changes fall into four categories: 1) #include differences 2) New errors due to some #ifdef paths being taken differently 3) Undefined functions (see, eg, the new HAVE_STRSEP) 4) Type differences (eg tv_usec is an int on os x, not a long int) As one concrete example, snprintf.c is an empty file on linux, where all the functionality is part of glibc. But on Solaris, some of its functionality is useful. This turned up a bug where if you have vsnprintf on your system but not vasnprintf, then dopr() was not being used but was being defined, leading to an "unused static function" warning in gcc. As another, solaris would complain about "index" being used as a variable, since it's also a function name. The var was renamed idx. Tested by compiling on FreeBSD, Solaris 10, and OS X leopard (x86). I also compiled and ran unittests under Linux Ubuntu, to make sure this change didn't break anything there. Reviewed by fergus@google.com
Diffstat (limited to 'src/srvrpc.c')
-rw-r--r--src/srvrpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/srvrpc.c b/src/srvrpc.c
index 3a3e9eb..ed1cc33 100644
--- a/src/srvrpc.c
+++ b/src/srvrpc.c
@@ -46,6 +46,7 @@
#include "dopt.h"
#include "hosts.h"
#include "bulk.h"
+#include "snprintf.h"
int dcc_r_request_header(int ifd,
enum dcc_protover *ver_ret)