diff -r 99d763e769c3 usr/src/head/Makefile --- a/usr/src/head/Makefile Tue Nov 29 11:46:16 2011 +1100 +++ b/usr/src/head/Makefile Fri Dec 23 08:16:07 2011 +0000 @@ -47,6 +47,7 @@ assert.h \ atomic.h \ attr.h \ + byteswap.h \ config_admin.h \ cpio.h \ crypt.h \ @@ -60,6 +61,7 @@ dlfcn.h \ door.h \ elf.h \ + endian.h \ err.h \ errno.h \ euc.h \ diff -r 99d763e769c3 usr/src/head/byteswap.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/head/byteswap.h Fri Dec 23 08:16:07 2011 +0000 @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _BYTESWAP_H +#define _BYTESWAP_H + +#include + +#define bswap_8 BSWAP_8 +#define bswap_16 BSWAP_16 +#define bswap_32 BSWAP_32 +#define bswap_64 BSWAP_64 + +#endif /* _BYTESWAP_H */ diff -r 99d763e769c3 usr/src/head/endian.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/head/endian.h Fri Dec 23 08:16:07 2011 +0000 @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _ENDIAN_H +#define _ENDIAN_H + +#include + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 + +#if defined(_LITTLE_ENDIAN) +#define __BYTE_ORDER __LITTLE_ENDIAN +#elif defined(_BIG_ENDIAN) +#define __BYTE_ORDER __BIG_ENDIAN +#endif + +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#define BIG_ENDIAN __BIG_ENDIAN +#define BYTE_ORDER __BYTE_ORDER + +#endif /* _ENDIAN_H */ diff -r 99d763e769c3 usr/src/pkg/manifests/system-header.mf --- a/usr/src/pkg/manifests/system-header.mf Tue Nov 29 11:46:16 2011 +1100 +++ b/usr/src/pkg/manifests/system-header.mf Fri Dec 23 08:16:07 2011 +0000 @@ -330,6 +330,7 @@ file path=usr/include/bsm/audit_uevents.h file path=usr/include/bsm/devices.h file path=usr/include/bsm/libbsm.h +file path=usr/include/byteswap.h file path=usr/include/config_admin.h file path=usr/include/cpio.h file path=usr/include/crypt.h @@ -359,6 +360,7 @@ file path=usr/include/dlfcn.h file path=usr/include/door.h file path=usr/include/elf.h +file path=usr/include/endian.h file path=usr/include/err.h file path=usr/include/errno.h file path=usr/include/eti.h