<commit_before>/* this file provides function aliasing/etc that are needed for
   compatibility with other binary espressif libraries */
#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"

/* SDK uses this and so does lwip, it was defined in libudhcp.a
   but that library has been removed. */
int errno;

/* libc memory management functions.

   Many of these are linked from the RTOS SDK blob libraries.

   In esp_iot_rtos_sdk these are aliased to exception-safe versions of
   the FreeRTOS functions. I think the rationale is that they're
   sometimes called in exception contexts (ESPTODO: Verify this).<commit_msg>Fix errno<commit_after>/* this file provides function aliasing/etc that are needed for
   compatibility with other binary espressif libraries */
#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"

/* SDK uses this and so does lwip, it was defined in libudhcp.a
   but that library has been removed. */
int errno;

/* newlib uses __errno in some contexts */
int *__errno(void) {
    return &errno;
}

/* libc memory management functions.

   Many of these are linked from the RTOS SDK blob libraries.

   In esp_iot_rtos_sdk these are aliased to exception-safe versions of
   the FreeRTOS functions. I think the rationale is that they're
   sometimes called in exception contexts (ESPTODO: Verify this).
{'fraction_non_alphanumeric': 0.0662202380952381, 'fraction_numerical': 0.0, 'mean_word_length': 3.9267399267399266, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2130849', 'n_tokens_mistral': 393, 'n_tokens_neox': 376, 'n_words': 178}