view libtest/local_endian.c @ 602:72cdae602d6e

libgsmhr1/dec_func.c: rm unused static functions In the original code, sp_dec.c held two kinds of functions: those needed only as part of the decoder, and those used by both decoder and encoder engines. In this library, we have moved the latter class of functions to dec_func.c module. Almost all static functions from the original sp_dec.c, with the exception of aToRc(), are needed only on sp_dec.c side of the new divide - remove them from dec_func.c, where they became dead code.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Dec 2025 18:58:22 +0000
parents 9a9d05a8fc75
children
line wrap: on
line source

/*
 * This C module is our current best attempt at determining the local endian
 * in a portable manner that (hopefully) won't come back to bite us when
 * someone needs to compile our software under a different flavor of Unix.
 */

#include <stdint.h>
#include <arpa/inet.h>
#include "local_endian.h"

int is_native_big_endian(void)
{
	uint16_t big_end_one;

	big_end_one = htons(1);
	if (big_end_one == 1)
		return 1;
	else
		return 0;
}