time.h 844 B

12345678910111213141516171819202122
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. /* Newlib sys/time.h defines timerisset, timerclear, timercmp, timeradd, timersub macros
  8. for __CYGWIN__ and __rtems__. We want to define these macros in IDF as well.
  9. Since we wish to use un-modified newlib headers until a patched newlib version is
  10. available, temporarily define __rtems__ here before including sys/time.h.
  11. __rtems__ is chosen instead of __CYGWIN__ since there are no other checks in sys/time.h
  12. which depend on __rtems__.
  13. Also, so that __rtems__ define does not affect other headers included from sys/time.h,
  14. we include them here in advance (_ansi.h and sys/types.h).
  15. */
  16. #include <_ansi.h>
  17. #include <sys/types.h>
  18. #define __rtems__
  19. #include_next <sys/time.h>
  20. #undef __rtems__