lib:util: Avoid name confusion with config.h
authorAndreas Schneider <asn@samba.org>
Wed, 21 Nov 2018 17:24:59 +0000 (18:24 +0100)
committerGary Lockyer <gary@samba.org>
Wed, 28 Nov 2018 22:19:22 +0000 (23:19 +0100)
The HAVE_* is normally used for config.h definitions, so rename it to
USE_ASM_BYTEORDER.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/util/byteorder.h

index 77afba58cbd5663439087bad51e93bb803387ed3..8656035693de34d6714165dbc5d1c361edae6100 100644 (file)
@@ -118,9 +118,9 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 {
        __asm__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
 }
-#define HAVE_ASM_BYTEORDER 1
+#define USE_ASM_BYTEORDER 1
 #else
-#define HAVE_ASM_BYTEORDER 0
+#define USE_ASM_BYTEORDER 0
 #endif
 
 #define CVAL(buf,pos) ((unsigned int)(((const uint8_t *)(buf))[pos]))
@@ -128,7 +128,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 #define PVAL(buf,pos) (CVAL(buf,pos))
 #define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))
 
-#if HAVE_ASM_BYTEORDER
+#if USE_ASM_BYTEORDER
 
 #define  _PTRPOS(buf,pos) (((const uint8_t *)(buf))+(pos))
 #define SVAL(buf,pos) ld_le16((const uint16_t *)_PTRPOS(buf,pos))
@@ -140,7 +140,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 #define SSVALS(buf,pos,val) SSVAL((buf),(pos),((int16_t)(val)))
 #define SIVALS(buf,pos,val) SIVAL((buf),(pos),((int32_t)(val)))
 
-#else /* not HAVE_ASM_BYTEORDER */
+#else /* not USE_ASM_BYTEORDER */
 
 #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
 #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
@@ -153,7 +153,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16_t)(val)))
 #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
 
-#endif /* not HAVE_ASM_BYTEORDER */
+#endif /* not USE_ASM_BYTEORDER */
 
 /* 64 bit macros */
 #define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))