Ignore:
Timestamp:
Jun 15, 2008, 2:28:14 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Remove htons() and htonl() from kernel mode: we use our custom hton16() and hton32() implementations everywhere instead, except in cacaserver which requires <arpa/inet.h> stuff anyway.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/kernel/kernel.c

    r2300 r2398  
    383383
    384384/* errno.h stuff */
     385
    385386int errno = 0;
    386387
    387 /* arpa/inet.h functions */
    388 
    389 /* XXX FIXME Converts only from little endian to big endian (x86) */
    390 unsigned int htonl(unsigned int hostlong)
    391 {
    392     return ((hostlong&0xFFFF0000)>>16)|((hostlong&0x0000FFFFFF)<<16);
    393 }
    394 
    395 /* XXX FIXME Converts only from little endian to big endian (x86) */
    396 unsigned short htons(unsigned short hostlong)
    397 {
    398     return ((hostlong&0xFF00)>>8)|((hostlong&0x00FF)<<8);
    399 }
    400 
    401388#endif /* __KERNEL__ */
Note: See TracChangeset for help on using the changeset viewer.