[cvs] / xvidcore / src / portab.h Repository:
ViewVC logotype

Diff of /xvidcore/src/portab.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41, Sun Feb 9 19:32:52 2003 UTC revision 1.42, Sun Feb 9 22:48:38 2003 UTC
# Line 76  Line 76 
76  /* debug level for this library */  /* debug level for this library */
77  #define DPRINTF_LEVEL           0  #define DPRINTF_LEVEL           0
78    
79  /* Buffer size for non C99 compliant compilers (msvc) */  /* Buffer size for msvc implementation because it outputs to DebugOutput */
80  #define DPRINTF_BUF_SZ  1024  #define DPRINTF_BUF_SZ  1024
81    
82  /*****************************************************************************  /*****************************************************************************
# Line 98  Line 98 
98  #    define uint64_t unsigned __int64  #    define uint64_t unsigned __int64
99    
100  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
101   | For GNU C compatible compilers   | For all other compilers, use the standard header file
102     | (compiler should be ISO C99 compatible, perhaps ISO C89 is enough)
103   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
104    
105  #elif defined(__GNUC__) || defined(__ICC)  #else
   
 #    define int8_t   char  
 #    define uint8_t  unsigned char  
 #    define int16_t  short  
 #    define uint16_t unsigned short  
 #    define int32_t  int  
 #    define uint32_t unsigned int  
 #    define int64_t  long long  
 #    define uint64_t unsigned long long  
106    
107  /*----------------------------------------------------------------------------  #    include <inttypes.h>
  | Ok, we don't know how to define these types... error  
  *---------------------------------------------------------------------------*/  
108    
 #else  
 #    error Do not know how to define (u)int(size)_t types.  
109  #endif  #endif
110    
111  /*****************************************************************************  /*****************************************************************************
# Line 375  Line 363 
363   ****************************************************************************/   ****************************************************************************/
364  #else /* Compiler test */  #else /* Compiler test */
365    
366  #    error Compiler not supported        /*
367               * Ok we know nothing about the compiler, so we fallback to ANSI C
368               * features, so every compiler should be happy and compile the code.
369               *
370               * This is (mostly) equivalent to ARCH_IS_GENERIC.
371               */
372    
373    #    ifdef _DEBUG
374    
375            /* Needed for all debuf fprintf calls */
376    #       include <stdio.h>
377    #       include <stdarg.h>
378    
379            static __inline void DPRINTF(int level, char *format, ...)
380            {
381                va_list args;
382                va_start(args, format);
383                if(DPRINTF_LEVEL & level) {
384                       vfprintf(stderr, format, args);
385                       fprintf(stderr, "\n");
386                            }
387                    }
388    
389    #    else /* _DEBUG */
390            static __inline void DPRINTF(int level, char *format, ...) {}
391    #    endif /* _DEBUG */
392    
393    #    define BSWAP(a) \
394                ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
395                       (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
396    
397    #    define EMMS()
398    
399    #    ifdef _PROFILING_
400    #       include <time.h>
401            static __inline int64_t read_counter(void)
402            {
403                return (int64_t)clock();
404            }
405    #    endif
406    
407    #        define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \
408                    type name[(sizex)*(sizey)]
409    
410  #endif /* Compiler test */  #endif /* Compiler test */
411    

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4