Update files to match FreeBSD layout

Add compatibility with Newlib header files.  Some FreeBSD header files
are mapped by the translation script:

     o rtems/bsd/sys/_types.h
     o rtems/bsd/sys/errno.h
     o rtems/bsd/sys/lock.h
     o rtems/bsd/sys/param.h
     o rtems/bsd/sys/resource.h
     o rtems/bsd/sys/time.h
     o rtems/bsd/sys/timespec.h
     o rtems/bsd/sys/types.h
     o rtems/bsd/sys/unistd.h

It is now possible to include <sys/socket.h> directly for example.

Generate one Makefile which builds everything including tests.
This commit is contained in:
Sebastian Huber
2013-10-09 22:52:54 +02:00
parent bceabc95c1
commit e599318e91
1305 changed files with 43694 additions and 40629 deletions

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* crypto/bf/bf_ecb.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
@@ -58,12 +58,12 @@
* [including the GNU Public Licence.]
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/crypto/blowfish/blowfish.h>
#include <freebsd/crypto/blowfish/bf_locl.h>
#include <rtems/bsd/sys/types.h>
#include <crypto/blowfish/blowfish.h>
#include <crypto/blowfish/bf_locl.h>
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
* (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: bf_enc.c,v 1.7 2002/02/27 01:33:59 itojun Exp $ */
@@ -61,12 +61,12 @@
* [including the GNU Public Licence.]
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/crypto/blowfish/blowfish.h>
#include <freebsd/crypto/blowfish/bf_locl.h>
#include <rtems/bsd/sys/types.h>
#include <crypto/blowfish/blowfish.h>
#include <crypto/blowfish/bf_locl.h>
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
* (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: bf_skey.c,v 1.7 2002/02/27 01:33:59 itojun Exp $ */
@@ -61,15 +61,15 @@
* [including the GNU Public Licence.]
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/sys/time.h>
#include <freebsd/sys/systm.h>
#include <freebsd/crypto/blowfish/blowfish.h>
#include <freebsd/crypto/blowfish/bf_locl.h>
#include <freebsd/crypto/blowfish/bf_pi.h>
#include <rtems/bsd/sys/types.h>
#include <rtems/bsd/sys/time.h>
#include <sys/systm.h>
#include <crypto/blowfish/blowfish.h>
#include <crypto/blowfish/bf_locl.h>
#include <crypto/blowfish/bf_pi.h>
void
BF_set_key(key, len, data)

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/*
*
@@ -29,13 +29,13 @@
* $FreeBSD$
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
#include <freebsd/sys/types.h>
#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#endif
#include <freebsd/crypto/camellia/camellia.h>
#include <crypto/camellia/camellia.h>
void
camellia_set_key(camellia_ctx *ctx, const u_char *key, int bits)

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* camellia.h ver 1.1.0
*
@@ -34,18 +34,18 @@
* http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
*/
#include <freebsd/sys/cdefs.h>
#include <freebsd/sys/types.h>
#include <freebsd/sys/endian.h>
#include <sys/cdefs.h>
#include <rtems/bsd/sys/types.h>
#include <sys/endian.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#else
#include <freebsd/string.h>
#include <freebsd/assert.h>
#include <string.h>
#include <assert.h>
#define KASSERT(exp, msg) assert(exp)
#endif
#include <freebsd/crypto/camellia/camellia.h>
#include <crypto/camellia/camellia.h>
/* key constants */

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: des_ecb.c,v 1.6 2001/09/10 04:03:58 itojun Exp $ */
@@ -50,13 +50,13 @@
* [including the GNU Public Licence.]
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/param.h>
#include <freebsd/sys/systm.h>
#include <freebsd/crypto/des/des_locl.h>
#include <freebsd/crypto/des/spr.h>
#include <rtems/bsd/sys/param.h>
#include <sys/systm.h>
#include <crypto/des/des_locl.h>
#include <crypto/des/spr.h>
/* char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay"; */ /* wrong */
/* char *DES_version="DES part of SSLeay 0.6.4 30-Aug-1996"; */

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: des_enc.c,v 1.1 2001/09/10 04:03:58 itojun Exp $ */
@@ -61,11 +61,11 @@
* [including the GNU Public Licence.]
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/crypto/des/des_locl.h>
#include <rtems/bsd/sys/types.h>
#include <crypto/des/des_locl.h>
extern const DES_LONG des_SPtrans[8][64];

View File

@@ -51,7 +51,7 @@
#ifndef HEADER_DES_LOCL_H
#define HEADER_DES_LOCL_H
#include <freebsd/crypto/des/des.h>
#include <crypto/des/des.h>
#undef DES_PTR

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: des_setkey.c,v 1.7 2001/09/10 04:03:58 itojun Exp $ */
@@ -58,14 +58,14 @@
* 1.0 First working version
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/param.h>
#include <freebsd/sys/systm.h>
#include <freebsd/crypto/des/des_locl.h>
#include <freebsd/crypto/des/podd.h>
#include <freebsd/crypto/des/sk.h>
#include <rtems/bsd/sys/param.h>
#include <sys/systm.h>
#include <crypto/des/des_locl.h>
#include <crypto/des/podd.h>
#include <crypto/des/sk.h>
int des_check_key=0;

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/*
* rc4.c
@@ -36,14 +36,14 @@
* OF SUCH DAMAGE.
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/param.h>
#include <freebsd/sys/kernel.h>
#include <freebsd/sys/module.h>
#include <freebsd/sys/types.h>
#include <freebsd/crypto/rc4/rc4.h>
#include <rtems/bsd/sys/param.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <rtems/bsd/sys/types.h>
#include <crypto/rc4/rc4.h>
static __inline void
swap_bytes(u_char *a, u_char *b)

View File

@@ -37,8 +37,8 @@
* $FreeBSD$
*/
#ifndef _SYS_CRYPTO_RC4_RC4_HH_
#define _SYS_CRYPTO_RC4_RC4_HH_
#ifndef _SYS_CRYPTO_RC4_RC4_H_
#define _SYS_CRYPTO_RC4_RC4_H_
struct rc4_state {
u_char perm[256];

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael-alg-fst.c,v 1.10 2003/07/15 10:47:16 itojun Exp $ */
/**
@@ -26,21 +26,21 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/cdefs.h>
#include <freebsd/sys/types.h>
#include <sys/cdefs.h>
#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#else
#include <freebsd/string.h>
#include <freebsd/assert.h>
#include <string.h>
#include <assert.h>
#define KASSERT(exp, msg) assert(exp)
#endif
#include <freebsd/crypto/rijndael/rijndael.h>
#include <freebsd/crypto/rijndael/rijndael_local.h>
#include <crypto/rijndael/rijndael.h>
#include <crypto/rijndael/rijndael_local.h>
/*
Te0[x] = S [x].[02, 01, 01, 03];

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael-api-fst.c,v 1.10 2001/05/27 09:34:18 itojun Exp $ */
@@ -17,18 +17,18 @@
* This code is placed in the public domain.
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/param.h>
#include <rtems/bsd/sys/param.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#else
#include <freebsd/string.h>
#include <string.h>
#endif
#include <freebsd/crypto/rijndael/rijndael_local.h>
#include <freebsd/crypto/rijndael/rijndael-api-fst.h>
#include <crypto/rijndael/rijndael_local.h>
#include <crypto/rijndael/rijndael-api-fst.h>
#ifndef TRUE
#define TRUE 1

View File

@@ -11,7 +11,7 @@
#ifndef __RIJNDAEL_API_FST_H
#define __RIJNDAEL_API_FST_H
#include <freebsd/crypto/rijndael/rijndael.h>
#include <crypto/rijndael/rijndael.h>
/* Generic Defines */
#define DIR_ENCRYPT 0 /* Are we encrpyting? */

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael.c,v 1.3 2003/08/28 14:20:22 itojun Exp $ */
@@ -28,15 +28,15 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#endif
#include <freebsd/crypto/rijndael/rijndael.h>
#include <crypto/rijndael/rijndael.h>
void
rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: sha1.c,v 1.5 2000/11/08 06:13:08 itojun Exp $ */
/*
@@ -36,15 +36,15 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/sys/cdefs.h>
#include <freebsd/sys/time.h>
#include <freebsd/sys/systm.h>
#include <rtems/bsd/sys/types.h>
#include <sys/cdefs.h>
#include <rtems/bsd/sys/time.h>
#include <sys/systm.h>
#include <freebsd/crypto/sha1.h>
#include <crypto/sha1.h>
/* sanity check */
#if BYTE_ORDER != BIG_ENDIAN

View File

@@ -35,8 +35,8 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
#ifndef _NETINET6_SHA1_HH_
#define _NETINET6_SHA1_HH_
#ifndef _NETINET6_SHA1_H_
#define _NETINET6_SHA1_H_
struct sha1_ctxt {
union {
@@ -69,4 +69,4 @@ typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
#endif /*_NETINET6_SHA1_HH_*/
#endif /*_NETINET6_SHA1_H_*/

View File

@@ -1,4 +1,4 @@
#include <freebsd/machine/rtems-bsd-config.h>
#include <machine/rtems-bsd-config.h>
/* $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $ */
@@ -36,18 +36,18 @@
* SUCH DAMAGE.
*/
#include <freebsd/sys/cdefs.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <freebsd/sys/types.h>
#include <freebsd/sys/time.h>
#include <rtems/bsd/sys/types.h>
#include <rtems/bsd/sys/time.h>
#ifdef _KERNEL
#include <freebsd/sys/systm.h>
#include <sys/systm.h>
#else
#include <freebsd/string.h>
#include <string.h>
#endif
#include <freebsd/machine/endian.h>
#include <freebsd/crypto/sha2/sha2.h>
#include <machine/rtems-bsd-endian.h>
#include <crypto/sha2/sha2.h>
/*
* ASSERT NOTE:

View File

@@ -72,7 +72,7 @@ typedef unsigned long long u_int64_t; /* 8-bytes (64-bits) */
* uintXX_t types defined by very recent ANSI C standards and included
* in the file:
*
* #include <freebsd/inttypes.h>
* #include <inttypes.h>
*
* If you choose to use <inttypes.h> then please define:
*