libcinit.cpp 419 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <AK/Types.h>
  7. #include <assert.h>
  8. #include <sys/internals.h>
  9. #include <unistd.h>
  10. extern "C" {
  11. #ifdef NO_TLS
  12. int errno;
  13. #else
  14. __thread int errno;
  15. #endif
  16. char** environ;
  17. bool __environ_is_malloced;
  18. bool __stdio_is_initialized;
  19. void __libc_init()
  20. {
  21. __malloc_init();
  22. __stdio_init();
  23. }
  24. }