2 * generic krb5-types.h for cross compiling, assume system is posix/sus
7 #ifndef __krb5_types_h__
8 #define __krb5_types_h__
11 #include <sys/types.h>
12 #include <sys/socket.h>
14 typedef socklen_t krb5_socklen_t;
16 typedef ssize_t krb5_ssize_t;
18 #if !defined(__has_extension)
19 #define __has_extension(x) 0
22 #define KRB5TYPES_REQUIRE_GNUC(m,n,p) \
23 (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \
24 (((m) * 10000) + ((n) * 100) + (p)))
27 #ifndef HEIMDAL_DEPRECATED
28 #if __has_extension(deprecated) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
29 #define HEIMDAL_DEPRECATED __attribute__((deprecated))
30 #elif defined(_MSC_VER) && (_MSC_VER>1200)
31 #define HEIMDAL_DEPRECATED __declspec(deprecated)
33 #define HEIMDAL_DEPRECATED
37 #ifndef HEIMDAL_PRINTF_ATTRIBUTE
38 #if __has_extension(format) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
39 #define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x))
41 #define HEIMDAL_PRINTF_ATTRIBUTE(x)
45 #ifndef HEIMDAL_NORETURN_ATTRIBUTE
46 #if __has_extension(noreturn) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
47 #define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn))
49 #define HEIMDAL_NORETURN_ATTRIBUTE
53 #ifndef HEIMDAL_UNUSED_ATTRIBUTE
54 #if __has_extension(unused) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
55 #define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused))
57 #define HEIMDAL_UNUSED_ATTRIBUTE
61 typedef int krb5_socket_t;
63 #endif /* __krb5_types_h__ */