home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue6 / SDL.ZIP / !gcc / include / unixlib / sys / h / byteorder < prev    next >
Encoding:
Text File  |  2006-09-17  |  1.1 KB  |  43 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/sys/byteorder.h,v $
  4.  * $Date: 2004/04/17 10:51:15 $
  5.  * $Revision: 1.4 $
  6.  * $State: Exp $
  7.  * $Author: nick $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef __SYS_BYTEORDER_H
  12. #define __SYS_BYTEORDER_H
  13.  
  14. #ifndef __UNIXLIB_FEATURES_H
  15. #include <features.h>
  16. #endif
  17.  
  18. #ifndef __ENDIAN_H
  19. #include <machine/endian.h>
  20. #endif
  21.  
  22. #ifndef __UNIXLIB_TYPES_H
  23. #include <unixlib/types.h>
  24. #endif
  25.  
  26. __BEGIN_DECLS
  27.  
  28. /* Convert a 32 bit word from host to net byte order.  */
  29. extern __u_long htonl (__u_long) __THROW __attribute__ ((__const__));
  30.  
  31. /* Convert a 32 bit word from net to host byte order. */
  32. extern __u_long ntohl (__u_long) __THROW __attribute__ ((__const__));
  33.  
  34. /* Convert a 16 bit word from host to net byte order. */
  35. extern __u_short htons (__u_short) __THROW __attribute__ ((__const__));
  36.  
  37. /* Convert a 16 bit word from net to host byte order. */
  38. extern __u_short ntohs (__u_short) __THROW __attribute__ ((__const__));
  39.  
  40. __END_DECLS
  41.  
  42. #endif
  43.