parser: switch to own endian conversion
htonl and htons require Ws2_32.lib on Windows, while we already have endian swapping functions in stdex. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
bdb266f039
commit
bf029efd07
@ -6,6 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "compat.hpp"
|
||||
#include "endian.hpp"
|
||||
#include "interval.hpp"
|
||||
#include "memory.hpp"
|
||||
#include "sgml.hpp"
|
||||
@ -2457,7 +2458,7 @@ namespace stdex
|
||||
if (i < 4)
|
||||
goto error;
|
||||
|
||||
value.s_addr = htonl(value.s_addr);
|
||||
HE2BE(reinterpret_cast<uint32_t&>(value.s_addr));
|
||||
this->interval.start = start;
|
||||
return true;
|
||||
|
||||
@ -2721,7 +2722,7 @@ namespace stdex
|
||||
goto error;
|
||||
}
|
||||
components[i].end = this->interval.end;
|
||||
this->value.s6_words[i] = htons((uint16_t)x);
|
||||
HE2BE(reinterpret_cast<uint16_t&>(this->value.s6_words[i]));
|
||||
}
|
||||
|
||||
if (compaction_i != SIZE_MAX) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user