diff --git a/ChangeLog.txt b/ChangeLog.txt index c392f39e8e..39cd6e5a31 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,14 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2024-01-29 17:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/harbour.def + + added hb_socketNToHS() to exported functions + + * src/rtl/hbsocket.c + + added hb_socketNToHS() for compilation without socket support + (HB_SOCKET_OFF macro) + 2024-01-28 12:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbfimage/core.c * use FreeImage_Rotate() instead of FreeImage_RotateClassic() in new diff --git a/src/harbour.def b/src/harbour.def index 7f77d8e83a..409360ea8e 100644 --- a/src/harbour.def +++ b/src/harbour.def @@ -3290,6 +3290,7 @@ hb_socketItemGet hb_socketItemPut hb_socketListen hb_socketLocalAddr +hb_socketNToHS hb_socketOpen hb_socketParam hb_socketRecv diff --git a/src/rtl/hbsocket.c b/src/rtl/hbsocket.c index 5925d8155f..f991effda2 100644 --- a/src/rtl/hbsocket.c +++ b/src/rtl/hbsocket.c @@ -435,6 +435,15 @@ int hb_socketInit( void ) { return -1; } void hb_socketCleanup( void ) { ; } +HB_U16 hb_socketNToHS( HB_U16 netshort ) +{ +#if defined( HB_LITTLE_ENDIAN ) + return HB_SWAP_UINT16( netshort ); +#else + return netshort; +#endif +} + int hb_socketGetAddrFamily( const void * pSockAddr, unsigned len ) { HB_SYMBOL_UNUSED( pSockAddr );