2 * generic krb5-types.h for cross compiling, assume system is posix/sus
5 #ifndef __krb5_types_h__
6 #define __krb5_types_h__
10 #include <sys/socket.h>
12 typedef socklen_t krb5_socklen_t;
14 typedef ssize_t krb5_ssize_t;
16 #if !defined(__has_extension)
17 #define __has_extension(x) 0
20 #define KRB5TYPES_REQUIRE_GNUC(m,n,p) \
21 (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \
22 (((m) * 10000) + ((n) * 100) + (p)))
25 #ifndef HEIMDAL_DEPRECATED
26 #if __has_extension(deprecated) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
27 #define HEIMDAL_DEPRECATED __attribute__ ((__deprecated__))
28 #elif defined(_MSC_VER) && (_MSC_VER>1200)
29 #define HEIMDAL_DEPRECATED __declspec(deprecated)
31 #define HEIMDAL_DEPRECATED
35 #ifndef HEIMDAL_PRINTF_ATTRIBUTE
36 #if __has_extension(format) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
37 #define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__ ((__format__ x))
39 #define HEIMDAL_PRINTF_ATTRIBUTE(x)
43 #ifndef HEIMDAL_NORETURN_ATTRIBUTE
44 #if __has_extension(noreturn) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
45 #define HEIMDAL_NORETURN_ATTRIBUTE __attribute__ ((__noreturn__))
47 #define HEIMDAL_NORETURN_ATTRIBUTE
51 #ifndef HEIMDAL_UNUSED_ATTRIBUTE
52 #if __has_extension(unused) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
53 #define HEIMDAL_UNUSED_ATTRIBUTE __attribute__ ((__unused__))
55 #define HEIMDAL_UNUSED_ATTRIBUTE
59 #ifndef HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE
60 #if __has_extension(__warn_unused_result__) || KRB5TYPES_REQUIRE_GNUC(3,3,0)
61 #define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE __attribute__ ((__warn_unused_result__))
65 typedef int krb5_socket_t;
67 #endif /* __krb5_types_h__ */