1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 03:32:24 +00:00

configure, libtt: add check for rpc_inline_t and define if not supported

This commit is contained in:
Jon Trulson 2021-12-22 13:12:01 -07:00
parent 931bcaa494
commit 1b67815df2
2 changed files with 12 additions and 10 deletions

View file

@ -419,6 +419,15 @@ AC_CHECK_LIB(tirpc, svc_register,
TIRPCLIB=-ltirpc]) TIRPCLIB=-ltirpc])
AC_SUBST(TIRPCLIB) AC_SUBST(TIRPCLIB)
dnl see if the rpc_inline_t type exists
AC_CHECK_TYPE(rpc_inline_t, [],
[AC_DEFINE_UNQUOTED([rpc_inline_t], [int32_t],
[Define to int32_t if not defined by including rpc/rpc.h])],
[
AC_INCLUDES_DEFAULT
#include <rpc/rpc.h>
])
dnl check sizeof time_t for RPC dnl check sizeof time_t for RPC
AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long])

View file

@ -35,6 +35,7 @@
#include <rpc/rpc.h> #include <rpc/rpc.h>
#include <util/tt_xdr_utils.h> #include <util/tt_xdr_utils.h>
#include <memory.h> #include <memory.h>
#include <autotools_config.h>
#include "tt_options.h" #include "tt_options.h"
#if defined(__OpenBSD__) #if defined(__OpenBSD__)
@ -77,11 +78,7 @@ tt_x_putbytes(XDR *xp, caddr_t, int len)
return TRUE; return TRUE;
} }
#if defined(CSRG_BASED) || defined(__linux__) rpc_inline_t *
static int32_t*
#else
static long *
#endif
#if defined(CSRG_BASED) || defined(__linux__) #if defined(CSRG_BASED) || defined(__linux__)
tt_x_inline(XDR *xp, unsigned int len) tt_x_inline(XDR *xp, unsigned int len)
#else #else
@ -99,11 +96,7 @@ tt_x_inline(XDR *xp, int len)
if (len > 0 && (caddr_t) (intptr_t) len < xp->x_base) { if (len > 0 && (caddr_t) (intptr_t) len < xp->x_base) {
xp->x_handy += RNDUP (len); xp->x_handy += RNDUP (len);
#if defined(CSRG_BASED) || defined(__linux__) return (rpc_inline_t *) xp->x_private;
return (int32_t *) xp->x_private;
#else
return (long *) xp->x_private;
#endif
} else } else
return 0; return 0;
} }