Skip to content

Commit

Permalink
CXX: Change RPC macro to HAVE_LIBTIRPC.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamievlin committed Apr 11, 2024
1 parent b2f03f0 commit ee52a02
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmake-scripts/external-libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ if (ENABLE_RPC_FEATURES)
list(APPEND ASY_STATIC_LIBARIES fmem)
list(APPEND ASYMPTOTE_INCLUDES $<TARGET_PROPERTY:fmem,INCLUDE_DIRECTORIES>)
endif()
list(APPEND ASY_MACROS HAVE_RPC_RPC_H)
list(APPEND ASY_MACROS HAVE_LIBTIRPC)


else()
Expand Down
6 changes: 3 additions & 3 deletions include/win32xdr.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if defined(_WIN32) && defined(HAVE_RPC_RPC_H)
#if defined(_WIN32) && defined(HAVE_LIBTIRPC)
#include <cstdint>
#include <cstring>
#include <cstdio>
Expand Down Expand Up @@ -74,7 +74,7 @@ struct w32_internal_xdr_conv_fn<uint8_t>
{
return in;
}

static auto constexpr host2NetFn = identity;
static auto constexpr net2HostFn = identity;

Expand Down Expand Up @@ -165,4 +165,4 @@ bool w32_xdr_float(Win32XDR* xdrs, float* ip);
bool w32_xdr_double(Win32XDR* xdrs, double* ip);


#endif
#endif
4 changes: 2 additions & 2 deletions include/xdrcommon.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if defined(HAVE_RPC_RPC_H)
#if defined(HAVE_LIBTIRPC)
#if defined(_WIN32)
#include "win32xdr.h"
typedef Win32XDR XDR;
Expand Down Expand Up @@ -79,4 +79,4 @@ inline bool_t xdr_u_long(XDR* __xdrs, unsigned long* __lp) {
#include <rpc/rpc.h>
#endif
#endif
#endif
#endif
2 changes: 1 addition & 1 deletion include/xstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef __xstream_h__
#define __xstream_h__ 1

#if defined(HAVE_RPC_RPC_H)
#if defined(HAVE_LIBTIRPC)

#include <cstdio>
#include <iostream>
Expand Down
4 changes: 2 additions & 2 deletions src/win32xdr.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(_WIN32) && defined(HAVE_RPC_RPC_H)
#if defined(_WIN32) && defined(HAVE_LIBTIRPC)

#include "win32xdr.h"

Expand Down Expand Up @@ -92,4 +92,4 @@ bool w32_xdr_u_char(Win32XDR* xdrs, unsigned char* ip)
return w32_internal_xdr_u_type<uint8_t>(xdrs, ip);
}

#endif
#endif
10 changes: 5 additions & 5 deletions src/xstream.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(HAVE_RPC_RPC_H)
#if defined(HAVE_LIBTIRPC)
#include "xstream.h"

namespace xdr
Expand All @@ -20,7 +20,7 @@ xbyte::operator unsigned char() const
return c;
}

// xios
// xios
int xios::good() const { return _state == 0; }
int xios::eof() const { return _state & eofbit; }
int xios::fail() const { return !good();}
Expand Down Expand Up @@ -50,7 +50,7 @@ OffsetType xstream::tell() {
ixstream::ixstream(bool singleprecision)
: singleprecision(singleprecision)
{

}

void ixstream::open(const char* filename, open_mode)
Expand Down Expand Up @@ -121,7 +121,7 @@ ixstream& ixstream::operator>>(xbyte& x)
// oxstream
oxstream::oxstream(bool singleprecision): singleprecision(singleprecision)
{

}
void oxstream::open(const char* filename, open_mode mode)
{
Expand Down Expand Up @@ -307,7 +307,7 @@ void ioxstream::close() {
}
ioxstream::ioxstream()
{

}
ioxstream::ioxstream(const char* filename)
{
Expand Down

0 comments on commit ee52a02

Please sign in to comment.