summaryrefslogtreecommitdiffstats
path: root/src/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-05 04:32:48 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-05 04:32:48 +0200
commit4df0522641275edaee6d7a65eab9ca3f913dfdce (patch)
tree93404a4c673e857fa2eef8e36bef74fc2ec76102 /src/macro.h
parentad01bbd52b17ea0acc5f9286ae871e8b6f62f8dd (diff)
fix prefix of byte order macros
Diffstat (limited to 'src/macro.h')
-rw-r--r--src/macro.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/macro.h b/src/macro.h
index d8b68d6..0ad892f 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -177,65 +177,65 @@ typedef void (*ca_free_cb_t)(void *);
#endif
#ifdef HAVE_BYTESWAP_H
-#define PA_INT16_SWAP(x) ((int16_t) bswap_16((uint16_t) x))
-#define PA_UINT16_SWAP(x) ((uint16_t) bswap_16((uint16_t) x))
-#define PA_INT32_SWAP(x) ((int32_t) bswap_32((uint32_t) x))
-#define PA_UINT32_SWAP(x) ((uint32_t) bswap_32((uint32_t) x))
+#define CA_INT16_SWAP(x) ((int16_t) bswap_16((uint16_t) x))
+#define CA_UINT16_SWAP(x) ((uint16_t) bswap_16((uint16_t) x))
+#define CA_INT32_SWAP(x) ((int32_t) bswap_32((uint32_t) x))
+#define CA_UINT32_SWAP(x) ((uint32_t) bswap_32((uint32_t) x))
#else
-#define PA_INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
-#define PA_UINT16_SWAP(x) ( (uint16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
-#define PA_INT32_SWAP(x) ( (int32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
-#define PA_UINT32_SWAP(x) ( (uint32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
+#define CA_INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
+#define CA_UINT16_SWAP(x) ( (uint16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
+#define CA_INT32_SWAP(x) ( (int32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
+#define CA_UINT32_SWAP(x) ( (uint32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
#endif
#ifdef WORDS_BIGENDIAN
- #define PA_INT16_FROM_LE(x) PA_INT16_SWAP(x)
- #define PA_INT16_FROM_BE(x) ((int16_t)(x))
+ #define CA_INT16_FROM_LE(x) CA_INT16_SWAP(x)
+ #define CA_INT16_FROM_BE(x) ((int16_t)(x))
- #define PA_INT16_TO_LE(x) PA_INT16_SWAP(x)
- #define PA_INT16_TO_BE(x) ((int16_t)(x))
+ #define CA_INT16_TO_LE(x) CA_INT16_SWAP(x)
+ #define CA_INT16_TO_BE(x) ((int16_t)(x))
- #define PA_UINT16_FROM_LE(x) PA_UINT16_SWAP(x)
- #define PA_UINT16_FROM_BE(x) ((uint16_t)(x))
+ #define CA_UINT16_FROM_LE(x) CA_UINT16_SWAP(x)
+ #define CA_UINT16_FROM_BE(x) ((uint16_t)(x))
- #define PA_UINT16_TO_LE(x) PA_UINT16_SWAP(x)
- #define PA_UINT16_TO_BE(x) ((uint16_t)(x))
+ #define CA_UINT16_TO_LE(x) CA_UINT16_SWAP(x)
+ #define CA_UINT16_TO_BE(x) ((uint16_t)(x))
- #define PA_INT32_FROM_LE(x) PA_INT32_SWAP(x)
- #define PA_INT32_FROM_BE(x) ((int32_t)(x))
+ #define CA_INT32_FROM_LE(x) CA_INT32_SWAP(x)
+ #define CA_INT32_FROM_BE(x) ((int32_t)(x))
- #define PA_INT32_TO_LE(x) PA_INT32_SWAP(x)
- #define PA_INT32_TO_BE(x) ((int32_t)(x))
+ #define CA_INT32_TO_LE(x) CA_INT32_SWAP(x)
+ #define CA_INT32_TO_BE(x) ((int32_t)(x))
- #define PA_UINT32_FROM_LE(x) PA_UINT32_SWAP(x)
- #define PA_UINT32_FROM_BE(x) ((uint32_t)(x))
+ #define CA_UINT32_FROM_LE(x) CA_UINT32_SWAP(x)
+ #define CA_UINT32_FROM_BE(x) ((uint32_t)(x))
- #define PA_UINT32_TO_LE(x) PA_UINT32_SWAP(x)
- #define PA_UINT32_TO_BE(x) ((uint32_t)(x))
+ #define CA_UINT32_TO_LE(x) CA_UINT32_SWAP(x)
+ #define CA_UINT32_TO_BE(x) ((uint32_t)(x))
#else
- #define PA_INT16_FROM_LE(x) ((int16_t)(x))
- #define PA_INT16_FROM_BE(x) PA_INT16_SWAP(x)
+ #define CA_INT16_FROM_LE(x) ((int16_t)(x))
+ #define CA_INT16_FROM_BE(x) CA_INT16_SWAP(x)
- #define PA_INT16_TO_LE(x) ((int16_t)(x))
- #define PA_INT16_TO_BE(x) PA_INT16_SWAP(x)
+ #define CA_INT16_TO_LE(x) ((int16_t)(x))
+ #define CA_INT16_TO_BE(x) CA_INT16_SWAP(x)
- #define PA_UINT16_FROM_LE(x) ((uint16_t)(x))
- #define PA_UINT16_FROM_BE(x) PA_UINT16_SWAP(x)
+ #define CA_UINT16_FROM_LE(x) ((uint16_t)(x))
+ #define CA_UINT16_FROM_BE(x) CA_UINT16_SWAP(x)
- #define PA_UINT16_TO_LE(x) ((uint16_t)(x))
- #define PA_UINT16_TO_BE(x) PA_UINT16_SWAP(x)
+ #define CA_UINT16_TO_LE(x) ((uint16_t)(x))
+ #define CA_UINT16_TO_BE(x) CA_UINT16_SWAP(x)
- #define PA_INT32_FROM_LE(x) ((int32_t)(x))
- #define PA_INT32_FROM_BE(x) PA_INT32_SWAP(x)
+ #define CA_INT32_FROM_LE(x) ((int32_t)(x))
+ #define CA_INT32_FROM_BE(x) CA_INT32_SWAP(x)
- #define PA_INT32_TO_LE(x) ((int32_t)(x))
- #define PA_INT32_TO_BE(x) PA_INT32_SWAP(x)
+ #define CA_INT32_TO_LE(x) ((int32_t)(x))
+ #define CA_INT32_TO_BE(x) CA_INT32_SWAP(x)
- #define PA_UINT32_FROM_LE(x) ((uint32_t)(x))
- #define PA_UINT32_FROM_BE(x) PA_UINT32_SWAP(x)
+ #define CA_UINT32_FROM_LE(x) ((uint32_t)(x))
+ #define CA_UINT32_FROM_BE(x) CA_UINT32_SWAP(x)
- #define PA_UINT32_TO_LE(x) ((uint32_t)(x))
- #define PA_UINT32_TO_BE(x) PA_UINT32_SWAP(x)
+ #define CA_UINT32_TO_LE(x) ((uint32_t)(x))
+ #define CA_UINT32_TO_BE(x) CA_UINT32_SWAP(x)
#endif
#define ca_streq(a, b) (strcmp((a),(b)) == 0)