<commit_before>/*
 * Copyright (c) 2013 <NAME>, All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */

#ifdef __APPLE__
#include <libkern/OSByteOrder.h>

/* __OSBogusByteSwap__() must not really exist in the symbol namespace
 * in order for the following to generate an error at build time.
 */
extern void __OSBogusByteSwap__(void);

#define host2wire(x)				\
	({ typeof (x) _X, _x = (x);		\
	 switch (sizeof(_x)) {			\
	 case 8:				\
	 	_X = OSSwapHostToLittleInt64(_x);	\
	 	break;				\
	 case 4:				\
	 	_X = OSSwapHostToLittleInt32(_x);	\
	 	break;				\
	 case 2:				\
	 	_X = OSSwapHostToLittleInt16(_x);	\
	 	break;				\
	 case 1:				\
	 	_X = _x;			\
		break;				\
	 default:				\
	 	__OSBogusByteSwap__();		\
		break;				\
	 }					\
	 _X;					\
	 })
#elif __FreeBSD__
#include <sys/endian.h>
#else
#include <endian.h>
#endif

#define host2wire(x)				\
	({ typeof (x) _X, _x = (x);		\
	 switch (sizeof(_x)) {			\
	 case 8:				\
	 	_X = htobe64(_x); \
	 	break;				\
	 case 4:				\
	 	_X = htobe32(_x); \
	 	break;				\
	 case 2:				\
	 	_X = htobe16(_x); \
	 	break;				\
	 case 1:				\
	 	_X = _x; \
		break;				\<commit_msg>Remove unnecessary __APPLE__ clause in byteswap<commit_after>/*
 * Copyright (c) 2013 Apple, Inc., <NAME>, All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */

#ifdef __FreeBSD__
#include <sys/endian.h>
#else
#include <endian.h>
#endif

#define host2wire(x)				\
	({ typeof (x) _X, _x = (x);		\
	 switch (sizeof(_x)) {			\
	 case 8:				\
	 	_X = htobe64(_x); \
	 	break;				\
	 case 4:				\
	 	_X = htobe32(_x); \
	 	break;				\
	 case 2:				\
	 	_X = htobe16(_x); \
	 	break;				\
	 case 1:				\
	 	_X = _x; \
		break;				\
{'fraction_non_alphanumeric': 0.11794871794871795, 'fraction_numerical': 0.017948717948717947, 'mean_word_length': 2.478980891719745, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7446144', 'n_tokens_mistral': 1152, 'n_tokens_neox': 972, 'n_words': 314}