xref: /netbsd-src/external/bsd/openpam/dist/include/security/openpam_attr.h (revision 6a493d6bc668897c91594964a732d38505b70cbb)
1 /*	$NetBSD: openpam_attr.h,v 1.4 2013/12/27 20:10:21 christos Exp $	*/
2 
3 /*
4  * Id: openpam_attr.h 656 2013-03-06 22:58:45Z des
5  */
6 
7 #ifndef SECURITY_OPENPAM_ATTR_H_INCLUDED
8 #define SECURITY_OPENPAM_ATTR_H_INCLUDED
9 
10 /* GCC attributes */
11 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__STRICT_ANSI__)
12 # define OPENPAM_GNUC_PREREQ(maj, min) \
13         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
14 #else
15 # define OPENPAM_GNUC_PREREQ(maj, min) 0
16 #endif
17 
18 #if OPENPAM_GNUC_PREREQ(2,5)
19 # define OPENPAM_FORMAT(params) __attribute__((__format__ params))
20 #else
21 # define OPENPAM_FORMAT(params)
22 #endif
23 
24 #if OPENPAM_GNUC_PREREQ(3,3)
25 # define OPENPAM_NONNULL(params) __attribute__((__nonnull__ params))
26 #else
27 # define OPENPAM_NONNULL(params)
28 #endif
29 
30 #if OPENPAM_GNUC_PREREQ(2,7)
31 # define OPENPAM_UNUSED(var) var __attribute__((__unused__))
32 #else
33 # define OPENPAM_UNUSED(var) var
34 #endif
35 
36 #endif /* !SECURITY_OPENPAM_ATTR_H_INCLUDED */
37