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
|
#pragma once
|
||||||
|
|
||||||
#include "compat.hpp"
|
#include "compat.hpp"
|
||||||
|
#include "endian.hpp"
|
||||||
#include "interval.hpp"
|
#include "interval.hpp"
|
||||||
#include "memory.hpp"
|
#include "memory.hpp"
|
||||||
#include "sgml.hpp"
|
#include "sgml.hpp"
|
||||||
@ -2457,7 +2458,7 @@ namespace stdex
|
|||||||
if (i < 4)
|
if (i < 4)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
value.s_addr = htonl(value.s_addr);
|
HE2BE(reinterpret_cast<uint32_t&>(value.s_addr));
|
||||||
this->interval.start = start;
|
this->interval.start = start;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -2721,7 +2722,7 @@ namespace stdex
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
components[i].end = this->interval.end;
|
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) {
|
if (compaction_i != SIZE_MAX) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user