GNU lib C inet functions ?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

GNU lib C inet functions ?

Post by Shazz »

Hello,

I'm porting a piece of code using ntohl, ntohs Byte Order Conversion functions. Shouldn't we have then in the toolchain ? Else does somebody have a simple stub or implementation for them ?

Thanks
- TiTAN Art Division -
http://www.titandemo.org
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Code: Select all

#define ntohs(x) __builtin_allegrex_wsbh(x)
#define ntohl(x) __builtin_allegrex_wsbw(x)
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Ah ah works perfect !

You're a master Marcus ;-)

Many thanks !
- TiTAN Art Division -
http://www.titandemo.org
Post Reply