From 5a2d6a8b64788fad9be2cfba9806d8301d203bb9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 16 Apr 2026 22:18:18 -0400 Subject: [PATCH] head: Add more standard headers Signed-off-by: Ian Moffett --- usr/src/head/stddef.h | 20 ++++++++++++++++++++ usr/src/head/stdint.h | 29 +++++++++++++++++++++++++++++ usr/src/head/string.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 usr/src/head/stddef.h create mode 100644 usr/src/head/stdint.h create mode 100644 usr/src/head/string.h diff --git a/usr/src/head/stddef.h b/usr/src/head/stddef.h new file mode 100644 index 0000000..14b0b25 --- /dev/null +++ b/usr/src/head/stddef.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * All rights reserved. + * + * The following sources are CONFIDENTIAL and PROPRIETARY + * property of Mirocom Laboratories. Unauthorized copying, + * use, distribution or modification of this file, in whole + * and in part, is strictly prohibited without the prior written + * consent from Mirocom Laboratories. + */ + +#ifndef _STDINT_H_ +#define _STDINT_H_ 1 + +#include + +typedef __ssize_t ssize_t; +typedef __size_t size_t; + +#endif /* !_STDINT_H_ */ diff --git a/usr/src/head/stdint.h b/usr/src/head/stdint.h new file mode 100644 index 0000000..4ceb0fe --- /dev/null +++ b/usr/src/head/stdint.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * All rights reserved. + * + * The following sources are CONFIDENTIAL and PROPRIETARY + * property of Mirocom Laboratories. Unauthorized copying, + * use, distribution or modification of this file, in whole + * and in part, is strictly prohibited without the prior written + * consent from Mirocom Laboratories. + */ + +#ifndef _STDINT_H_ +#define _STDINT_H_ 1 + +#include + +/* Unsigned types */ +typedef __uint8_t uint8_t; +typedef __uint16_t uint16_t; +typedef __uint32_t uint32_t; +typedef __uint64_t uint64_t; + +/* Unsigned types */ +typedef __int8_t int8_t; +typedef __int16_t int16_t; +typedef __int32_t int32_t; +typedef __int64_t int64_t; + +#endif /* !_STDINT_H_ */ diff --git a/usr/src/head/string.h b/usr/src/head/string.h new file mode 100644 index 0000000..644c892 --- /dev/null +++ b/usr/src/head/string.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * All rights reserved. + * + * The following sources are CONFIDENTIAL and PROPRIETARY + * property of Mirocom Laboratories. Unauthorized copying, + * use, distribution or modification of this file, in whole + * and in part, is strictly prohibited without the prior written + * consent from Mirocom Laboratories. + */ + +#ifndef _STRING_H_ +#define _STRING_H_ 1 + +#include +#include + +/* + * Fill a buffer with 'n' bytes of 'c' + */ +void *memset(void *s, int c, size_t n); + +/* + * Compare 'n' bytes of two buffers 's1' and 's2' + */ +int memcmp(const void *s1, const void *s2, size_t n); + +/* + * Copy 'count' bytes of 'src' to 'dest' + */ +void *memcpy(void *dest, const void *src, size_t count); + +#endif /* _STRING_H_ */