Maybe include <sys/types.h> and <sys/select.h>
[heimdal.git] / include / krb5-types.cross
bloba30632faeb80e53ee2198533ab031c7dd88f6820
1 /*
2  * generic krb5-types.h for cross compiling, assume system is posix/sus
3  */
5 #ifndef __krb5_types_h__
6 #define __krb5_types_h__
8 #include <inttypes.h>
9 #include <sys/types.h>
10 #include <sys/socket.h>
12 typedef socklen_t krb5_socklen_t;
13 #include <unistd.h>
14 typedef ssize_t krb5_ssize_t;
16 #ifndef HEIMDAL_DEPRECATED
17 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
18 #define HEIMDAL_DEPRECATED __attribute__((deprecated))
19 #elif defined(_MSC_VER) && (_MSC_VER>1200) 
20 #define HEIMDAL_DEPRECATED __declspec(deprecated)
21 #else
22 #define HEIMDAL_DEPRECATED
23 #endif
24 #endif
26 #ifndef HEIMDAL_PRINTF_ATTRIBUTE
27 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
28 #define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x))
29 #else
30 #define HEIMDAL_PRINTF_ATTRIBUTE(x)
31 #endif
32 #endif
34 #ifndef HEIMDAL_NORETURN_ATTRIBUTE
35 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
36 #define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn))
37 #else
38 #define HEIMDAL_NORETURN_ATTRIBUTE
39 #endif
40 #endif
42 typedef int krb5_socket_t;
44 #endif /* __krb5_types_h__ */