summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/htons.c
blob: 92a43f937bc4e081c4d6c0b6f9e821eaabe30241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <asm/byteorder.h>

#undef htons
#ifdef __i386__
unsigned short int htons(unsigned short int netshort) {
  return ___arch__swab16(netshort);
}
#else
unsigned short int htons(unsigned short int netshort) {
  return netshort;
}
#endif