main.c 680 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <memory.h>
  8. #include <string.h>
  9. void
  10. on_init()
  11. {}
  12. int
  13. my_sqrt(int x, int y)
  14. {
  15. return x * x + y * y;
  16. }
  17. void *
  18. null_pointer()
  19. {
  20. void *ptr = NULL;
  21. return ptr;
  22. }
  23. void *
  24. my_malloc(int size)
  25. {
  26. return malloc(size);
  27. }
  28. void *
  29. my_calloc(int nmemb, int size)
  30. {
  31. return calloc(nmemb, size);
  32. }
  33. void
  34. my_free(void *ptr)
  35. {
  36. return free(ptr);
  37. }
  38. void *
  39. my_memcpy(void *dst, void *src, int size)
  40. {
  41. return memcpy(dst, src, size);
  42. }
  43. char *
  44. my_strdup(const char *s)
  45. {
  46. return strdup(s);
  47. }