<commit_before>#ifndef UNIX_H
#define UNIX_H

#include <stdlib.h>
#include "amconfig.h"

#if defined(HAVE_DECL_STRNDUP) && !HAVE_DECL_STRNDUP
extern char *strndup(const char *str, size_t n);
#endif
#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
extern int asprintf(char **ret, const char *format, ...);
#endif

#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#elif defined(__linux__)
#include <byteswap.h>
#else
#error "Don't know how to deal with endianness on this platform."
#endif

#endif
<commit_msg>byteswap support for NetBSD<commit_after>#ifndef UNIX_H
#define UNIX_H

#include <stdlib.h>
#include "amconfig.h"

#if defined(HAVE_DECL_STRNDUP) && !HAVE_DECL_STRNDUP
extern char *strndup(const char *str, size_t n);
#endif
#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
extern int asprintf(char **ret, const char *format, ...);
#endif

#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#elif defined(__linux__)
#include <byteswap.h>
#elif defined(__NetBSD__)
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
#else
#error "Don't know how to deal with endianness on this platform."
#endif

#endif

{'fraction_non_alphanumeric': 0.10969196093163035, 'fraction_numerical': 0.027047332832456798, 'mean_word_length': 6.881656804733728, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3564150', 'n_tokens_mistral': 545, 'n_tokens_neox': 508, 'n_words': 136}