This removes the last uses of u_int and u_char from the LibreSSL tree.
Index: chacha/chacha-merged.c
===================================================================
RCS file: /cvs/src/lib/libcrypto/chacha/chacha-merged.c,v
retrieving revision 1.9
diff -u -p -r1.9 chacha-merged.c
--- chacha/chacha-merged.c 22 Jan 2019 00:59:21 -0000 1.9
+++ chacha/chacha-merged.c 22 Oct 2021 10:07:18 -0000
@@ -5,31 +5,29 @@ D. J. Bernstein
Public domain.
*/
-#include <sys/types.h>
-
#include <stdint.h>
-#define CHACHA_MINKEYLEN 16
+#define CHACHA_MINKEYLEN 16
#define CHACHA_NONCELEN 8
#define CHACHA_CTRLEN 8
#define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN)
#define CHACHA_BLOCKLEN 64
struct chacha_ctx {
- u_int input[16];
+ unsigned int input[16];
uint8_t ks[CHACHA_BLOCKLEN];
uint8_t unused;
};
-static inline void chacha_keysetup(struct chacha_ctx *x, const u_char *k,
- u_int kbits)
+static inline void chacha_keysetup(struct chacha_ctx *x,
+ const unsigned char *k, unsigned int kbits)
__attribute__((__bounded__(__minbytes__, 2, CHACHA_MINKEYLEN)));
-static inline void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv,
- const u_char *ctr)
+static inline void chacha_ivsetup(struct chacha_ctx *x, const unsigned char
*iv,
+ const unsigned char *ctr)
__attribute__((__bounded__(__minbytes__, 2, CHACHA_NONCELEN)))
__attribute__((__bounded__(__minbytes__, 3, CHACHA_CTRLEN)));
-static inline void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m,
- u_char *c, u_int bytes)
+static inline void chacha_encrypt_bytes(struct chacha_ctx *x,
+ const unsigned char *m, unsigned char *c, unsigned int bytes)
__attribute__((__bounded__(__buffer__, 2, 4)))
__attribute__((__bounded__(__buffer__, 3, 4)));
@@ -127,7 +125,7 @@ chacha_encrypt_bytes(chacha_ctx *x, cons
u32 j8, j9, j10, j11, j12, j13, j14, j15;
u8 *ctarget = NULL;
u8 tmp[64];
- u_int i;
+ unsigned int i;
if (!bytes)
return;