Change int align.
This commit is contained in:
parent
24cab6bd0d
commit
182c2057f2
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: c.h,v 1.30 1998/01/27 15:35:00 momjian Exp $
|
* $Id: c.h,v 1.31 1998/02/11 21:17:44 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -705,16 +705,11 @@ typedef struct Exception
|
|||||||
#define StrNCpy(dst,src,len) \
|
#define StrNCpy(dst,src,len) \
|
||||||
(strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : (dummyret)NULL,(void)(dst))
|
(strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : (dummyret)NULL,(void)(dst))
|
||||||
|
|
||||||
/* Get a bit mask of the bits set in non-int32 aligned addresses */
|
|
||||||
#define INT_ALIGN_MASK (sizeof(int32) - 1)
|
|
||||||
|
|
||||||
/* This function gets call too often, so we inline it if we can */
|
/* This function gets call too often, so we inline it if we can */
|
||||||
#define MemSet(start, val, len) do \
|
#define MemSet(start, val, len) do \
|
||||||
{ /* are we aligned for int32? */ \
|
{ /* are we aligned for int32? */ \
|
||||||
/* We have to cast the pointer to int \
|
if ((start) == INTALIGN(start) && \
|
||||||
so we can do the AND */ \
|
(len) % sizeof(int32) == 0 && \
|
||||||
if (((int)(start) & INT_ALIGN_MASK) == 0 && \
|
|
||||||
((len) & INT_ALIGN_MASK) == 0 && \
|
|
||||||
(val) == 0 && \
|
(val) == 0 && \
|
||||||
/* \
|
/* \
|
||||||
* We got this number by testing this \
|
* We got this number by testing this \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user