xref: /netbsd-src/external/bsd/openpam/dist/include/security/openpam_attr.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 /*	$NetBSD: openpam_attr.h,v 1.6 2017/05/06 19:50:09 christos Exp $	*/
2 
3 /*
4  * $OpenPAM: openpam_attr.h 938 2017-04-30 21:34:42Z 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