test suite: Fail test if para_server could not be started.
[paraslash.git] / gcc-compat.h
index a3b20d3964d0b39ab4693b20b2d80514001f6220..729e3ae1656deec60e6cafa37877db823e3c4852 100644 (file)
@@ -1,43 +1,25 @@
-#if __GNUC__ >= 3
-# define inline                inline __attribute__ ((always_inline))
-# define __pure                __attribute__ ((pure))
-# define __noreturn    __attribute__ ((noreturn))
-# define __malloc      __attribute__ ((malloc))
-# define __used                __attribute__ ((used))
-# define __unused      __attribute__ ((unused))
-# define __packed      __attribute__ ((packed))
-# define likely(x)     __builtin_expect (!!(x), 1)
-# define unlikely(x)   __builtin_expect (!!(x), 0)
-/* 
- * p is the number of the "format string" parameter, and q is 
- * the number of the first variadic parameter 
+#define inline inline __attribute__ ((always_inline))
+#define __noreturn __attribute__ ((noreturn))
+#define __malloc __attribute__ ((malloc))
+#define __a_unused __attribute__ ((unused))
+#define __a_aligned(alignment) __attribute__((__aligned__(alignment)))
+
+/*
+ * p is the number of the "format string" parameter, and q is the number of the
+ * first variadic parameter. If q is specified as zero, the compiler only
+ * checks the format string for consistency.
  */
 # define __printf(p,q) __attribute__ ((format (printf, p, q)))
+# define __a_const __attribute__ ((const))
+
 /*
- * as direct use of __printf(p,q) confuses doxygen, here are two extra macros
- * for those values p,q that are actually used by paraslash.
+ * As direct use of __printf(p,q) confuses doxygen, here are some extra macros
+ * for those values p,q that are actually used.
  */
-#define  __printf_1_2 __printf(1,2)
-#define  __printf_2_3 __printf(2,3)
-
-#else
-
-# define inline                /* no inline */
-# define __pure                /* no pure */
-# define __noreturn    /* no noreturn */
-# define __malloc      /* no malloc */
-# define __used                /* no used */
-# define __unused      /* no unused */
-# define __packed      /* no packed */
-# define likely(x)     (x)
-# define unlikely(x)   (x)
-# define __printf(p,q) /* no format */
-#define  __printf_1_2
-#define  __printf_2_3
-#endif
+#define __printf_2_0 __printf(2,0)
+#define __printf_1_2 __printf(1,2)
+#define __printf_2_3 __printf(2,3)
+#define __printf_3_4 __printf(3,4)
 
-# if __GNUC__ >=3 && __GNUC_MINOR__ > 3
-# define __must_check  __attribute__ ((warn_unused_result))
-# else
-# define __must_check  /* no warn_unused_result */
-# endif
+#define __must_check __attribute__ ((warn_unused_result))
+#define _static_inline_ static inline