2 * generic krb5-types.h for cross compiling, assume system is posix/sus
6 #ifndef __krb5_types_h__
7 #define __krb5_types_h__
10 #include <sys/types.h>
11 #include <sys/socket.h>
13 typedef socklen_t krb5_socklen_t;
15 typedef ssize_t krb5_ssize_t;
17 #if !defined(__has_extension)
18 #define __has_extension(x) 0
21 #define KRB5TYPES_REQUIRE_GNUC(m,n,p) \
22 (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \
23 (((m) * 10000) + ((n) * 100) + (p)))
26 #ifndef HEIMDAL_DEPRECATED
27 #if __has_extension(deprecated) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
28 #define HEIMDAL_DEPRECATED __attribute__((deprecated))
29 #elif defined(_MSC_VER) && (_MSC_VER>1200)
30 #define HEIMDAL_DEPRECATED __declspec(deprecated)
32 #define HEIMDAL_DEPRECATED
36 #ifndef HEIMDAL_PRINTF_ATTRIBUTE
37 #if __has_extension(format) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
38 #define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x))
40 #define HEIMDAL_PRINTF_ATTRIBUTE(x)
44 #ifndef HEIMDAL_NORETURN_ATTRIBUTE
45 #if __has_extension(noreturn) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
46 #define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn))
48 #define HEIMDAL_NORETURN_ATTRIBUTE
52 #ifndef HEIMDAL_UNUSED_ATTRIBUTE
53 #if __has_extension(unused) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
54 #define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused))
56 #define HEIMDAL_UNUSED_ATTRIBUTE
60 typedef int krb5_socket_t;
62 #endif /* __krb5_types_h__ */