--- portab.h 2003/01/04 06:14:32 1.26.2.4 +++ portab.h 2003/01/26 05:09:00 1.26.2.7 @@ -52,7 +52,7 @@ * exception also makes it possible to release a modified version which * carries forward this exception. * - * $Id: portab.h,v 1.26.2.4 2003/01/04 06:14:32 suxen_drol Exp $ + * $Id: portab.h,v 1.26.2.7 2003/01/26 05:09:00 suxen_drol Exp $ * ****************************************************************************/ @@ -76,7 +76,7 @@ /* debug level for this library */ #ifdef _DEBUG -#define DPRINTF_LEVEL (DPRINTF_RC|0x0000000f) +#define DPRINTF_LEVEL (DPRINTF_RC|0x0000007F) #else #define DPRINTF_LEVEL DPRINTF_RC #endif @@ -167,6 +167,10 @@ #include #include + /* non-ansi function mapping */ +# define snprintf _snprintf +# define vsnprintf _vsnprintf + /* * This function must be declared/defined all the time because MSVC does * not support C99 variable arguments macros @@ -198,8 +202,6 @@ *---------------------------------------------------------------------------*/ # if defined(ARCH_X86) # define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax -# define EMMS() __asm {emms} -# define FEMMS() __asm {femms} static __inline int64_t read_counter(void) { @@ -225,8 +227,6 @@ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) -#define EMMS() -#define FEMMS() # endif @@ -272,8 +272,6 @@ *---------------------------------------------------------------------------*/ # if defined(ARCH_X86) # define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ); -# define EMMS() __asm__ ("emms\n\t"); -# define FEMMS() __asm__ ("femms\n\t"); static __inline int64_t read_counter(void) { @@ -290,8 +288,6 @@ # elif defined(ARCH_PPC) # define BSWAP(a) __asm__ __volatile__ \ ( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a)); -# define EMMS() -# define FEMMS() static __inline unsigned long get_tbl(void) { @@ -324,8 +320,6 @@ # define BSWAP(a) __asm__ __volatile__ \ ("mux1 %1 = %0, @rev" ";;" \ "shr.u %1 = %1, 32" : "=r" (a) : "r" (a)); -# define EMMS() -# define FEMMS() static __inline int64_t read_counter(void) { unsigned long result; @@ -340,8 +334,6 @@ # define BSWAP(a) \ ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) -# define EMMS() -# define FEMMS() static __inline int64_t read_counter(void) { @@ -355,8 +347,6 @@ # define BSWAP(a) \ ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) -# define EMMS() -# define FEMMS() static __inline int64_t read_counter(void) { @@ -374,8 +364,6 @@ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) -#define EMMS() -#define FEMMS() # endif /* Architecture checking */ /*****************************************************************************