XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
#define HasXdmAuth YES
-XCOMM If you have the tirpc library on your system, and you have the
-XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
-XCOMM your host.def or site.def file. Using the tirpc lib should
-XCOMM allow running rpcbind in secure mode (ie: without the -i option).
-XCOMM The default is NO.
+XCOMM TIRPC is enabled by default now on Linux. The libtirpc-dev package is
+XCOMM required for this support. If you cannot use tirpc for some reason,
+XCOMM can disable it by defining HasTIRPCLib to NO in either
+XCOMM your host.def or site.def file. Not using the TIRPC lib will require
+XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
+XCOMM The default is YES.
#ifndef HasTIRPCLib
-# define HasTIRPCLib NO
+# define HasTIRPCLib YES
#endif
#if HasTIRPCLib
TIRPCLIB = -ltirpc
+TIRPCINC = -I/usr/include/tirpc
#else
-TIRPCLIB =
+TIRPCLIB =
+TIRPCINC =
#endif
#if !defined(DefaultGcc2i386Opt)
#define ArchitectureDefines -DLINUX_ARCHITECTURE
#define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
-#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
+
+#define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
#include <lnxDep.rules>
#include <lnxLib.rules>
SUBDIRS = mini_isam lib slib bin
LINTSUBDIRS = mini_isam lib slib bin
+INCLUDES = $(TIRPCINC)
+
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
SUBDIRS = dbck shell scripts tt_type_comp \
ttauth ttdbserverd ttsession tttar tttrace
+INCLUDES = $(TIRPCINC)
+
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
LintSubdirs($(SUBDIRS))
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../../slib -I../../lib -I../../mini_isam
+INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib -I../../mini_isam
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
/* Any shell scripts shipped as part of ToolTalk are collected here. */
PROGRAMS = ttce2xdr
+INCLUDES = $(TIRPCINC)
all:: $(PROGRAMS)
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../../lib
+INCLUDES = $(TIRPCINC) -I. -I../../lib
DEPLIBS = TtClientDepLibs
LOCAL_LIBRARIES = TtClientLibs
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../lib -I../../slib
+INCLUDES = $(TIRPCINC) -I../../lib -I../../slib
DEPLIBS = ../../slib/libstt.a TtClientDepLibs
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs
DEFINES =
CONN_DEFINES = ConnectionFlags
-INCLUDES = -I. -I../../slib -I../../lib
+INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib
DEPLIBS = TtClientDepLibs
LOCAL_LIBRARIES = TtClientLibs
#include "../../tooltalk.tmpl"
-DEFINES =
-INCLUDES = -I. -I../../slib -I../../lib -I../../mini_isam
+DEFINES = $(TIRPC_DEFINES)
+INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib -I../../mini_isam
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
// (with a 16 byte key, the rec length must be at least 31)
if ((length > 30) && !memcmp(record+16, "_TT_QUEUED_MSGS", 15)) {
// Get the address of the client
-#if defined(OPT_TLI)
+#if defined(OPT_TLI) || defined(OPT_TIRPC)
netbuf *client_address = svc_getrpccaller(transp);
_Tt_string client_id(client_address->len);
memcpy((char *)client_id, client_address->buf, client_address->len);
#else
struct sockaddr_in *client_address = svc_getcaller(transp);
+
_Tt_string client_id(sizeof(struct in_addr));
memcpy( (char *)client_id, &client_address->sin_addr,
sizeof(struct in_addr) );
// (with a 16 byte key, the rec length must be at least 27)
else if ((length > 26) && !memcmp(record+16, "_TT_MSG_", 8)) {
// Get the address of the client
-#if defined(OPT_TLI)
+#if defined(OPT_TLI) || defined(OPT_TIRPC)
netbuf *client_address = svc_getrpccaller(transp);
_Tt_string client_id(client_address->len);
(void)memcpy((char *)client_id, client_address->buf, client_address->len);
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../../slib -I../../lib
+INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib
DEPLIBS = ../../slib/libstt.a TtClientDepLibs
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../../lib
+INCLUDES = $(TIRPCINC) -I. -I../../lib
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../../lib
+INCLUDES = $(TIRPCINC) -I. -I../../lib
DEPLIBS = TtClientDepLibs
LOCAL_LIBRARIES = TtClientLibs
#include "../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I.
+INCLUDES = $(TIRPCINC) -I.
#ifdef RsArchitecture
REALPATHC = realpath.c
SUBDIRS = c dnd
DONES = c/DONE dnd/DONE
+INCLUDES = $(TIRPCINC)
+
MakeSubdirs($(SUBDIRS))
ForceSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#include "../../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../../lib
+INCLUDES = $(TIRPCINC) -I../../../lib
/*** NOTE!
*** Every time a .o is added below it needs to be added to
#include "../../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../..
+INCLUDES = $(TIRPCINC) -I../..
/*** NOTE!
*** Every time a .o is added below it needs to be added to
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../lib
+INCLUDES = $(TIRPCINC) -I../../lib
ISAM_INCLUDES = -I../../mini_isam
/*** NOTE!
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../lib
+INCLUDES = $(TIRPCINC) -I../../lib
ISAM_INCLUDES = -I../../mini_isam
/* Use BSD-compatible accept() call */
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../lib
+INCLUDES = $(TIRPCINC) -I../../lib
/*** NOTE!
*** Every time a .o is added below it needs to be added to
#include "../../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I../../lib
+INCLUDES = $(TIRPCINC) -I../../lib
#ifdef RsArchitecture
/* To get definitions of iswprint and iswspace */
#include "../tooltalk.tmpl"
DEPEND_DEFINES = $(DEPENDDEFINES)
-INCLUDES = -I.
+INCLUDES = $(TIRPCINC) -I.
SRCS = isaddindex.c isamaddindex.c isopen.c isamopen.c \
isdelcurr.c isdelrec.c isamdelrec.c isbuild.c \
#include "../tooltalk.tmpl"
DEFINES =
-INCLUDES = -I. -I../lib
+INCLUDES = $(TIRPCINC) -I. -I../lib
SRCS = \
mp_ce_attrs.C mp_observer.C mp_observer_utils.C \
/* put EXTRA_DEFINES and EXTRA_INCLUDES below */
+
+/* For linux with TIRPC, set this so the right bits can/will be used. */
+XCOMM Enable TIRPC for linux hosts with the option enabled
+#ifdef LinuxArchitecture
+# if HasTIRPCLib
+TIRPC_DEFINES = -DOPT_TIRPC
+# else
+TIRPC_DEFINES =
+# endif
+#endif
+
#ifdef SunArchitecture
LAST_LOAD_FLAGS = -Bstatic -lC -Bdynamic -lm -lc -Bstatic
#endif
#if defined(LinuxArchitecture)
EXTRA_DEFINES = -D${PROGRAMS} $(XINOPT) -DUSE_X11SSEXT
-SYS_LIBRARIES = $(XINLIB) -lXss -ldl -lcrypt -lm
+SYS_LIBRARIES = $(XINLIB) $(TIRPCLIB) -lXss -ldl -lcrypt -lm
+INCLUDES = $(TIRPCINC)
#endif
#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture)