1/* 2 * Copyright (c) 2011-12 Apple Inc. All Rights Reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23/* 24 * generic krb5-types.h for cross compiling, assume system is posix/sus 25 */ 26 27#ifndef __asn1_krb5_types_h__ 28#define __asn1_krb5_types_h__ 29 30#include <inttypes.h> 31#include <sys/types.h> 32#include <sys/socket.h> 33 34typedef socklen_t krb5_socklen_t; 35#include <unistd.h> 36typedef ssize_t krb5_ssize_t; 37 38#ifndef HEIMDAL_DEPRECATED 39#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 40#define HEIMDAL_DEPRECATED __attribute__((deprecated)) 41#elif defined(_MSC_VER) && (_MSC_VER>1200) 42#define HEIMDAL_DEPRECATED __declspec(deprecated) 43#else 44#define HEIMDAL_DEPRECATED 45#endif 46#endif 47 48#ifndef HEIMDAL_PRINTF_ATTRIBUTE 49#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 50#define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x)) 51#else 52#define HEIMDAL_PRINTF_ATTRIBUTE(x) 53#endif 54#endif 55 56#ifndef HEIMDAL_NORETURN_ATTRIBUTE 57#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 58#define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn)) 59#else 60#define HEIMDAL_NORETURN_ATTRIBUTE 61#endif 62#endif 63 64#ifndef HEIMDAL_UNUSED_ATTRIBUTE 65#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 66#define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused)) 67#else 68#define HEIMDAL_UNUSED_ATTRIBUTE 69#endif 70#endif 71 72 73typedef int krb5_socket_t; 74 75#endif /* __asn1_krb5_types_h__ */ 76