1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Ported almost everything to BSD. Utils::route_entries and sending link layer PDUs still don't work.

This commit is contained in:
Matias Fontanini
2012-11-28 00:11:42 -03:00
parent e6e3e8453b
commit 6696c1b284
23 changed files with 486 additions and 227 deletions

View File

@@ -31,12 +31,19 @@
#define TINS_ENDIANNESS_H
#include <stdint.h>
#ifndef WIN32
#include "arch.h"
#ifdef BSD
#include <sys/endian.h>
#define TINS_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
#define TINS_IS_BIG_ENDIAN (_BYTE_ORDER == _BIG_ENDIAN)
#elif !defined(WIN32)
#include <endian.h>
#define TINS_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
#define TINS_IS_BIG_ENDIAN (__BYTE_ORDER == __BIG_ENDIAN)
#endif
#define TINS_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
#define TINS_IS_BIG_ENDIAN (__BYTE_ORDER == __BIG_ENDIAN)
namespace Tins {
namespace Endian {