Diff for /qemu/osdep.h between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 16:47:25 version 1.1.1.5, 2018/04/24 16:50:43
Line 2 Line 2
 #define QEMU_OSDEP_H  #define QEMU_OSDEP_H
   
 #include <stdarg.h>  #include <stdarg.h>
   #ifdef __OpenBSD__
   #include <sys/types.h>
   #include <sys/signal.h>
   #endif
   
   #ifndef _WIN32
   #include <sys/time.h>
   #endif
   
 #ifndef glue  #ifndef glue
 #define xglue(x, y) x ## y  #define xglue(x, y) x ## y
Line 19 Line 27
 #define unlikely(x)   __builtin_expect(!!(x), 0)  #define unlikely(x)   __builtin_expect(!!(x), 0)
 #endif  #endif
   
   #ifndef offsetof
   #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
   #endif
   #ifndef container_of
   #define container_of(ptr, type, member) ({                      \
           const typeof(((type *) 0)->member) *__mptr = (ptr);     \
           (type *) ((char *) __mptr - offsetof(type, member));})
   #endif
   
 #ifndef MIN  #ifndef MIN
 #define MIN(a, b) (((a) < (b)) ? (a) : (b))  #define MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif  #endif
Line 26 Line 43
 #define MAX(a, b) (((a) > (b)) ? (a) : (b))  #define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif  #endif
   
   #ifndef ARRAY_SIZE
   #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
   #endif
   
 #ifndef always_inline  #ifndef always_inline
 #if (__GNUC__ < 3) || defined(__APPLE__)  #if (__GNUC__ < 3) || defined(__APPLE__)
 #define always_inline inline  #define always_inline inline
 #else  #else
 #define always_inline __attribute__ (( always_inline )) __inline__  #define always_inline __attribute__ (( always_inline )) __inline__
   #ifdef __OPTIMIZE__
   #define inline always_inline
 #endif  #endif
 #endif  #endif
   #else
 #define inline always_inline  #define inline always_inline
   #endif
   
 #ifdef __i386__  #ifdef __i386__
 #define REGPARM(n) __attribute((regparm(n)))  #define REGPARM __attribute((regparm(3)))
 #else  #else
 #define REGPARM(n)  #define REGPARM
 #endif  #endif
   
 #define qemu_printf printf  #define qemu_printf printf
   
 void *qemu_malloc(size_t size);  #if defined (__GNUC__) && defined (__GNUC_MINOR__)
 void *qemu_mallocz(size_t size);  # define QEMU_GNUC_PREREQ(maj, min) \
 void qemu_free(void *ptr);           ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
 char *qemu_strdup(const char *str);  #else
   # define QEMU_GNUC_PREREQ(maj, min) 0
   #endif
   
 void *qemu_memalign(size_t alignment, size_t size);  void *qemu_memalign(size_t alignment, size_t size);
 void *qemu_vmalloc(size_t size);  void *qemu_vmalloc(size_t size);
 void qemu_vfree(void *ptr);  void qemu_vfree(void *ptr);
   
 void *get_mmap_addr(unsigned long size);  
   
 int qemu_create_pidfile(const char *filename);  int qemu_create_pidfile(const char *filename);
   
 #ifdef _WIN32  #ifdef _WIN32

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com