lib_base.h 944 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _LIB_BASE_H_
  6. #define _LIB_BASE_H_
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. void *malloc(size_t size);
  11. void *calloc(size_t n, size_t size);
  12. void free(void *ptr);
  13. int memcmp(const void *s1, const void *s2, size_t n);
  14. void *memcpy(void *dest, const void *src, size_t n);
  15. void *memmove(void *dest, const void *src, size_t n);
  16. void *memset(void *s, int c, size_t n);
  17. int putchar(int c);
  18. int snprintf(char *str, size_t size, const char *format, ...);
  19. int sprintf(char *str, const char *format, ...);
  20. char *strchr(const char *s, int c);
  21. int strcmp(const char *s1, const char *s2);
  22. char *strcpy(char *dest, const char *src);
  23. size_t strlen(const char *s);
  24. int strncmp(const char * str1, const char * str2, size_t n);
  25. char *strncpy(char *dest, const char *src, unsigned long n);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif