1 /* $NetBSD: openpam_attr.h,v 1.7 2023/06/30 21:46:20 christos Exp $ */ 2 3 #ifndef SECURITY_OPENPAM_ATTR_H_INCLUDED 4 #define SECURITY_OPENPAM_ATTR_H_INCLUDED 5 6 /* GCC attributes */ 7 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__STRICT_ANSI__) 8 # define OPENPAM_GNUC_PREREQ(maj, min) \ 9 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) 10 #else 11 # define OPENPAM_GNUC_PREREQ(maj, min) 0 12 #endif 13 14 #if OPENPAM_GNUC_PREREQ(2,5) 15 # define OPENPAM_FORMAT(params) __attribute__((__format__ params)) 16 #else 17 # define OPENPAM_FORMAT(params) 18 #endif 19 20 #if OPENPAM_GNUC_PREREQ(3,3) 21 # define OPENPAM_NONNULL(params) __attribute__((__nonnull__ params)) 22 #else 23 # define OPENPAM_NONNULL(params) 24 #endif 25 26 #if OPENPAM_GNUC_PREREQ(2,7) 27 # define OPENPAM_UNUSED(var) var __attribute__((__unused__)) 28 #else 29 # define OPENPAM_UNUSED(var) var 30 #endif 31 32 #endif /* !SECURITY_OPENPAM_ATTR_H_INCLUDED */ 33