source: rtems/cpukit/include/md5.h @ ff081aee

5
Last change on this file since ff081aee was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*
2 ***********************************************************************
3 ** md5.h -- header file for implementation of MD5                    **
4 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
5 ** Created: 2/17/90 RLR                                              **
6 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
7 ** Revised (for MD5): RLR 4/27/91                                    **
8 **   -- G modified to have y&~z instead of y&z                       **
9 **   -- FF, GG, HH modified to add in last register done             **
10 **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
11 **   -- distinct additive constant for each step                     **
12 **   -- round 4 added, working mod 7                                 **
13 ***********************************************************************
14 */
15
16/*
17 ***********************************************************************
18 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **
19 **                                                                   **
20 ** License to copy and use this software is granted provided that    **
21 ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **
22 ** Digest Algorithm" in all material mentioning or referencing this  **
23 ** software or this function.                                        **
24 **                                                                   **
25 ** License is also granted to make and use derivative works          **
26 ** provided that such works are identified as "derived from the RSA  **
27 ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **
28 ** material mentioning or referencing the derived work.              **
29 **                                                                   **
30 ** RSA Data Security, Inc. makes no representations concerning       **
31 ** either the merchantability of this software or the suitability    **
32 ** of this software for any particular purpose.  It is provided "as  **
33 ** is" without express or implied warranty of any kind.              **
34 **                                                                   **
35 ** These notices must be retained in any copies of any part of this  **
36 ** documentation and/or software.                                    **
37 ***********************************************************************
38 */
39
40#ifndef __MD5_INCLUDE__
41
42#include <stdint.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif /* __cplusplus */
47
48/* typedef a 32-bit type */
49typedef uint32_t UINT4;
50
51#define MD5_BLOCK_LENGTH                64
52#define MD5_DIGEST_LENGTH               16
53
54/* Data structure for MD5 (Message-Digest) computation */
55typedef struct {
56  UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */
57  UINT4 buf[4];                                    /* scratch buffer */
58  unsigned char in[64];                              /* input buffer */
59  unsigned char digest[16];     /* actual digest after MD5Final call */
60} MD5_CTX;
61
62void MD5Init (MD5_CTX *);
63void MD5Update (MD5_CTX *, const void *, unsigned int);
64void MD5Final (unsigned char [16], MD5_CTX *);
65
66#ifdef __cplusplus
67}
68#endif /* __cplusplus */
69
70#define __MD5_INCLUDE__
71#endif /* __MD5_INCLUDE__ */
Note: See TracBrowser for help on using the repository browser.