- single KERNEL_VERSION(a,b,c) macro in platform.h
[oweals/busybox.git] / include / platform.h
index ea2983d30f859b00bd12125311c0cc769455084f..6b3b3f78e582a6ccff54afdbe0857a15674e651c 100644 (file)
 # endif
 #endif
 
-#if 0
-/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
-#ifndef ATTRIBUTE_MALLOC
-# if __GNUC_PREREQ (2,96)
-#  define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-#  define ATTRIBUTE_MALLOC
-# endif /* GNUC >= 2.96 */
-#endif /* ATTRIBUTE_MALLOC */
-#endif
-
 #ifndef ATTRIBUTE_UNUSED
 # define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
 #endif /* ATTRIBUTE_UNUSED */
 # include <netinet/in.h>
 #endif
 
+/*----- Kernel versioning ------------------------------------*/
+#ifdef __linux__
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#else
+#error implement KERNEL_VERSION for your platform
+#endif
+
 /* ---- miscellaneous --------------------------------------- */
 /* NLS stuff */
 /* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */