Home | History | Annotate | Line # | Download | only in include
bswap.h revision 1.1
      1 /*      $NetBSD: bswap.h,v 1.1 1999/01/15 13:31:28 bouyer Exp $      */
      2 
      3 /* Written by Manuel Bouyer. Public domain */
      4 
      5 #ifndef _VAX_BSWAP_H_
      6 #define _VAX_BSWAP_H_
      7 
      8 #include <sys/cdefs.h>
      9 
     10 __BEGIN_DECLS
     11 #ifdef _KERNEL
     12 u_int16_t       bswap16 __P((u_int16_t));
     13 u_int32_t       bswap32 __P((u_int32_t));
     14 #else
     15 u_int16_t       bswap16 __P((u_int16_t)) __RENAME(__bswap16);
     16 u_int32_t       bswap32 __P((u_int32_t)) __RENAME(__bswap32);
     17 #endif
     18 u_int64_t       bswap64 __P((u_int64_t));
     19 __END_DECLS
     20 
     21 #ifdef  __GNUC__
     22 
     23 #include <vax/byte_swap.h>
     24 #define bswap16(x)      __byte_swap_word(x)
     25 #define bswap32(x)      __byte_swap_long(x)
     26 
     27 #endif /* __GNUC__ */
     28 
     29 #endif /* _VAX_BSWAP_H_ */
     30