]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Add __attribute_const macro for gcc >= 3
authorRoland Dreier <rolandd@cisco.com>
Tue, 11 Apr 2006 20:33:33 +0000 (20:33 +0000)
committerRoland Dreier <rolandd@cisco.com>
Thu, 9 Nov 2006 19:36:00 +0000 (11:36 -0800)
Signed-off-by: Roland Dreier <rolandd@cisco.com>
ChangeLog
include/infiniband/verbs.h

index 310c71b67a703e1238615e2ea23a3b45aa12b122..d0db2040e05bbe1f020d869fe8b17849cadd4d61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-11  Roland Dreier  <rdreier@cisco.com>
+
+       * include/infiniband/verbs.h: Add __attribute_const macro to
+       portably mark functions as __attribute__((const))
+
 2006-03-28  Roland Dreier  <rdreier@cisco.com>
 
        * src/init.c (load_driver): Print warning if dlopen() of a driver
index ccea54c3baeb6b8002eae0a8725ad81a5c3ef084..b8ff8a7989ce58334f04e48f989ffba4d242c88e 100644 (file)
 #  define END_C_DECLS
 #endif /* __cplusplus */
 
+#if __GNUC__ >= 3
+#  define __attribute_const __attribute__((const))
+#else
+#  define __attribute_const
+#endif
+
 BEGIN_C_DECLS
 
 union ibv_gid {
@@ -949,4 +955,6 @@ int ibv_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid);
 
 END_C_DECLS
 
+#  undef __attribute_const
+
 #endif /* INFINIBAND_VERBS_H */