Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/ntirpc/misc/portable.h
$ cat -n /usr/include/ntirpc/misc/portable.h 1 2 #ifndef NTIRPC_PORTABLE_H 3 #define NTIRPC_PORTABLE_H 4 5 #include
6 #include
/* before rpc.h */ 7 8 #if BSDBASED 9 #include
10 11 #define SOL_IP IPPROTO_IP 12 #define SOL_IPV6 IPPROTO_IPV6 13 #endif 14 15 #if defined(__FreeBSD__) 16 17 #define IP_PKTINFO IP_RECVIF 18 19 struct in_pktinfo { 20 struct in_addr ipi_addr; /* destination IPv4 address */ 21 int ipi_ifindex; /* received interface index */ 22 }; 23 24 /* YES. Move. */ 25 #define HAVE_PEEREID 1 26 27 #endif 28 29 #if defined(__linux__) 30 31 /* POSIX clocks */ 32 #define CLOCK_REALTIME_FAST CLOCK_REALTIME_COARSE 33 #define CLOCK_MONOTONIC_FAST CLOCK_MONOTONIC_COARSE 34 35 /* poll */ 36 #define POLLRDNORM 0x040 /* Normal data may be read. */ 37 #define POLLRDBAND 0x080 /* Priority data may be read. */ 38 39 #define HAVE_GETPEEREID 0 40 41 #endif 42 43 #if defined(_WIN32) 44 #ifdef _MSC_VER 45 #include
46 #else 47 #include
48 #endif 49 #include
50 #include
51 52 #define CLOCK_MONOTONIC_FAST 6 53 54 typedef uint32_t clockid_t; 55 extern int clock_gettime(clockid_t clock, struct timespec *ts); 56 57 void warnx(const char *fmt, ...); 58 59 #else 60 #define PtrToUlong(addr) ((unsigned long)(addr)) 61 #endif /* !_WIN32 */ 62 63 #ifdef __APPLE__ 64 #include
65 #define CLOCK_REALTIME_FAST CLOCK_REALTIME 66 #define CLOCK_MONOTONIC_FAST CLOCK_MONOTONIC 67 #endif 68 69 #if !defined(CACHE_LINE_SIZE) 70 #if defined(__PPC64__) 71 #define CACHE_LINE_SIZE 128 72 #else /* __x86_64__, __i386__ and others */ 73 #define CACHE_LINE_SIZE 64 74 #endif 75 #endif 76 77 #define CACHE_PAD(_n) char __pad ## _n [CACHE_LINE_SIZE] 78 79 /* Define bswap_## on non-GNU systems. */ 80 #if defined(_MSC_VER) 81 82 #include
83 #define bswap_16(x) _byteswap_ushort(x) 84 #define bswap_32(x) _byteswap_ulong(x) 85 #define bswap_64(x) _byteswap_uint64(x) 86 87 #elif defined(__APPLE__) 88 89 /* macOS / Darwin features */ 90 #include
91 #define bswap_16(x) OSSwapInt16(x) 92 #define bswap_32(x) OSSwapInt32(x) 93 #define bswap_64(x) OSSwapInt64(x) 94 95 #elif defined(__FreeBSD__) 96 97 #include
98 #define bswap_16(x) bswap16((x)) 99 #define bswap_32(x) bswap32((x)) 100 #define bswap_64(x) bswap64((x)) 101 102 #else 103 104 /* Must be on Linux. GNU supplies bswap_## directly. */ 105 #include
106 107 #endif /* bswap_## */ 108 109 #endif /* NTIRPC_PORTABLE_H */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™