diff options
author | Ryo Nakamura <upa@haeena.net> | 2024-02-16 14:54:24 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2024-02-17 12:39:19 +0900 |
commit | f71c7a145a4c840baff1d34e9d2c3d9e2f26d74e (patch) | |
tree | 0931150b21c7e9e883437dccc212c4206c43db5f /src/platform.h | |
parent | 4e895bb72e035c7c5034dd8beca7c8497413ad9e (diff) |
add checkpoint.c and .h
Diffstat (limited to 'src/platform.h')
-rw-r--r-- | src/platform.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/platform.h b/src/platform.h index f26e86c..9426951 100644 --- a/src/platform.h +++ b/src/platform.h @@ -21,28 +21,25 @@ int setutimes(const char *path, struct timespec atime, struct timespec mtime); sem_t *sem_create(int value); int sem_release(sem_t *sem); - #ifdef HAVE_HTONLL #include <arpa/inet.h> /* Apple has htonll and ntohll in arpa/inet.h */ #endif /* copied from libssh: libssh/include/libssh/priv.h*/ #ifndef HAVE_HTONLL -# ifdef WORDS_BIGENDIAN -# define htonll(x) (x) -# else -# define htonll(x) \ - (((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)) -# endif +#ifdef WORDS_BIGENDIAN +#define htonll(x) (x) +#else +#define htonll(x) (((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32)) +#endif #endif #ifndef HAVE_NTOHLL -# ifdef WORDS_BIGENDIAN -# define ntohll(x) (x) -# else -# define ntohll(x) \ - (((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) -# endif +#ifdef WORDS_BIGENDIAN +#define ntohll(x) (x) +#else +#define ntohll(x) (((uint64_t)ntohl((x)&0xFFFFFFFF) << 32) | ntohl((x) >> 32)) +#endif #endif #endif /* _PLATFORM_H_ */ |