<commit_before># Check for strnlen()
AC_SUBST(BSON_HAVE_STRNLEN, 0)
AC_CHECK_FUNC(strnlen, [AC_SUBST(BSON_HAVE_STRNLEN, 1)])

# Check for snprintf()
AC_SUBST(BSON_HAVE_SNPRINTF, 0)
AC_CHECK_FUNC(snprintf, [AC_SUBST(BSON_HAVE_SNPRINTF, 1)])

# Check for _set_output_format (unlikely, only Visual Studio 2013 and older)
AC_SUBST(BSON_NEEDS_SET_OUTPUT_FORMAT, 0)
AC_CHECK_FUNCS(_set_output_format, [AC_SUBST(BSON_NEEDS_SET_OUTPUT_FORMAT, 1)])

# Check for struct timespec
AC_SUBST(BSON_HAVE_TIMESPEC, 0)
AC_CHECK_TYPES([struct timespec], [AC_SUBST(BSON_HAVE_TIMESPEC, 1)])

# Check for clock_gettime and if it needs -lrt
AC_SUBST(BSON_HAVE_CLOCK_GETTIME, 0)
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_SUBST(BSON_HAVE_CLOCK_GETTIME, 1)])


# Check for pthreads. We might need to make this better to handle mingw,<commit_msg>CDRIVER-1314: timespec is available in time.h in POSIX<commit_after># Check for strnlen()
AC_SUBST(BSON_HAVE_STRNLEN, 0)
AC_CHECK_FUNC(strnlen, [AC_SUBST(BSON_HAVE_STRNLEN, 1)])

# Check for snprintf()
AC_SUBST(BSON_HAVE_SNPRINTF, 0)
AC_CHECK_FUNC(snprintf, [AC_SUBST(BSON_HAVE_SNPRINTF, 1)])

# Check for _set_output_format (unlikely, only Visual Studio 2013 and older)
AC_SUBST(BSON_NEEDS_SET_OUTPUT_FORMAT, 0)
AC_CHECK_FUNCS(_set_output_format, [AC_SUBST(BSON_NEEDS_SET_OUTPUT_FORMAT, 1)])

# Check for struct timespec
AC_SUBST(BSON_HAVE_TIMESPEC, 0)
AC_CHECK_TYPE([struct timespec], [AC_SUBST(BSON_HAVE_TIMESPEC, 1)], [], [#include <time.h>])

# Check for clock_gettime and if it needs -lrt
AC_SUBST(BSON_HAVE_CLOCK_GETTIME, 0)
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_SUBST(BSON_HAVE_CLOCK_GETTIME, 1)])


# Check for pthreads. We might need to make this better to handle mingw,
{'fraction_non_alphanumeric': 0.10275983558426306, 'fraction_numerical': 0.018790369935408103, 'mean_word_length': 8.681818181818182, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3812647', 'n_tokens_mistral': 756, 'n_tokens_neox': 701, 'n_words': 146}