diff options
author | mp153739 <none@none> | 2006-10-07 13:37:05 -0700 |
---|---|---|
committer | mp153739 <none@none> | 2006-10-07 13:37:05 -0700 |
commit | 56a424cca6b3f91f31bdab72a4626c48c779fe8b (patch) | |
tree | 9a50fae6e9e88996cc646a6b9a53425b2b8539d7 /usr/src/lib/krb5/db2/include | |
parent | 124771bb5f403108fb9ed84bf6083c8d427d55ff (diff) | |
download | illumos-joyent-56a424cca6b3f91f31bdab72a4626c48c779fe8b.tar.gz |
PSARC 2006/424 Kerberos 1.4 KDC Resync
6406993 kdc and client resync with MIT 1.4
Diffstat (limited to 'usr/src/lib/krb5/db2/include')
-rw-r--r-- | usr/src/lib/krb5/db2/include/db-int.h | 97 | ||||
-rw-r--r-- | usr/src/lib/krb5/db2/include/db-queue.h | 8 |
2 files changed, 92 insertions, 13 deletions
diff --git a/usr/src/lib/krb5/db2/include/db-int.h b/usr/src/lib/krb5/db2/include/db-int.h index 37f6a0a377..c5c43a481a 100644 --- a/usr/src/lib/krb5/db2/include/db-int.h +++ b/usr/src/lib/krb5/db2/include/db-int.h @@ -1,5 +1,5 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -52,22 +52,91 @@ extern "C" { #include <db.h> -/* deal with autoconf-based stuff (db.h includes db-config.h) */ +/* deal with autoconf-based stuff */ -#ifndef HAVE_MEMMOVE -#define memmove my_memmove +#define DB_LITTLE_ENDIAN 1234 +#define DB_BIG_ENDIAN 4321 + +#include <stdlib.h> +#ifdef HAVE_ENDIAN_H +# include <endian.h> +#endif +#ifdef HAVE_MACHINE_ENDIAN_H +# include <machine/endian.h> +#endif +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> #endif -#ifndef HAVE_MKSTEMP -#define mkstemp my_mkstemp +/* SUNW14resync: + The following code is disabled as it correctly determines the + endianness of the system. This would break backward compatability + for x86 as prior to this resync all architectures are treated + similarily - as big endian. See definition of "WORDS_BIGENDIAN" in + db-config.h. +*/ +#if 0 +/* Handle both BIG and LITTLE defined and BYTE_ORDER matches one, or + just one defined; both with and without leading underscores. + + Ignore "PDP endian" machines, this code doesn't support them + anyways. */ +#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && !defined(BYTE_ORDER) +# ifdef __LITTLE_ENDIAN__ +# define LITTLE_ENDIAN __LITTLE_ENDIAN__ +# endif +# ifdef __BIG_ENDIAN__ +# define BIG_ENDIAN __BIG_ENDIAN__ +# endif +#endif +#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && !defined(BYTE_ORDER) +# ifdef _LITTLE_ENDIAN +# define LITTLE_ENDIAN _LITTLE_ENDIAN +# endif +# ifdef _BIG_ENDIAN +# define BIG_ENDIAN _BIG_ENDIAN +# endif +# ifdef _BYTE_ORDER +# define BYTE_ORDER _BYTE_ORDER +# endif +#endif +#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && !defined(BYTE_ORDER) +# ifdef __LITTLE_ENDIAN +# define LITTLE_ENDIAN __LITTLE_ENDIAN +# endif +# ifdef __BIG_ENDIAN +# define BIG_ENDIAN __BIG_ENDIAN +# endif +# ifdef __BYTE_ORDER +# define BYTE_ORDER __BYTE_ORDER +# endif +#endif + +#if defined(_MIPSEL) && !defined(LITTLE_ENDIAN) +# define LITTLE_ENDIAN +#endif +#if defined(_MIPSEB) && !defined(BIG_ENDIAN) +# define BIG_ENDIAN +#endif + +#if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) && defined(BYTE_ORDER) +# if LITTLE_ENDIAN == BYTE_ORDER +# define DB_BYTE_ORDER DB_LITTLE_ENDIAN +# elif BIG_ENDIAN == BYTE_ORDER +# define DB_BYTE_ORDER DB_BIG_ENDIAN +# else +# error "LITTLE_ENDIAN and BIG_ENDIAN defined, but can't determine byte order" +# endif +#elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) +# define DB_BYTE_ORDER DB_LITTLE_ENDIAN +#elif defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN) +# define DB_BYTE_ORDER DB_BIG_ENDIAN +#else +# error "can't determine byte order from included system headers" #endif -#ifndef HAVE_STRERROR -#define strerror my_strerror #endif -#define DB_LITTLE_ENDIAN 1234 -#define DB_BIG_ENDIAN 4321 #ifdef WORDS_BIGENDIAN #define DB_BYTE_ORDER DB_BIG_ENDIAN @@ -86,6 +155,13 @@ extern "C" { #include <fcntl.h> #include <stdio.h> #include <errno.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif +#ifdef HAVE_INTTYPES_H +/* Tru64 5.1: int8_t is defined here, and stdint.h doesn't exist. */ +#include <inttypes.h> +#endif #include <sys/types.h> #include <sys/stat.h> #include <sys/param.h> @@ -227,7 +303,6 @@ void __dbpanic __P((DB *dbp)); #ifndef O_BINARY #define O_BINARY 0 /* Needed for Win32 compiles */ #endif - #endif /* _DB_INT_H_ */ #ifdef __cplusplus diff --git a/usr/src/lib/krb5/db2/include/db-queue.h b/usr/src/lib/krb5/db2/include/db-queue.h index 6f09a66805..983c444d59 100644 --- a/usr/src/lib/krb5/db2/include/db-queue.h +++ b/usr/src/lib/krb5/db2/include/db-queue.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _KRB5_DB2_DBQUEUE_H @@ -47,6 +47,9 @@ extern "C" { * @(#)queue.h 8.3 (Berkeley) 12/13/93 */ +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + /* * This file defines three types of data structures: lists, tail queues, * and circular queues. @@ -253,6 +256,7 @@ struct { \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } +#endif /* !_QUEUE_H_ */ #ifdef __cplusplus } |