Просмотр исходного кода

Define __attribute_const__

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Waldemar Brodkorb 10 лет назад
Родитель
Сommit
75cb2a2b25
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      include/sys/cdefs.h

+ 6 - 0
include/sys/cdefs.h

@@ -231,6 +231,12 @@
 # define __attribute_pure__ /* Ignore */
 # define __attribute_pure__ /* Ignore */
 #endif
 #endif
 
 
+#if __GNUC_PREREQ (2,96)
+# define __attribute_const__ __attribute__((__const__))
+#else
+# define __attribute_const__     /* unimplemented */
+#endif
+
 /* At some point during the gcc 3.1 development the `used' attribute
 /* At some point during the gcc 3.1 development the `used' attribute
    for functions was introduced.  We don't want to use it unconditionally
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
    (although this would be possible) since it generates warnings.  */