Ignore:
Timestamp:
16/02/2010 23:05:33 (2 years ago)
Author:
chris
Message:

Add overloaded hton() and ntoh() functions for file attribute comparison
macro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/Box.h

    r2606 r2613  
    164164#endif 
    165165 
     166// overloaded auto-conversion functions 
     167inline uint64_t hton(uint64_t in) { return box_hton64(in); } 
     168inline uint32_t hton(uint32_t in) { return htonl(in); } 
     169inline uint16_t hton(uint16_t in) { return htons(in); } 
     170inline uint8_t  hton(uint8_t in)  { return in; } 
     171inline int64_t  hton(int64_t in)  { return box_hton64(in); } 
     172inline int32_t  hton(int32_t in)  { return htonl(in); } 
     173inline int16_t  hton(int16_t in)  { return htons(in); } 
     174inline int8_t   hton(int8_t in)   { return in; } 
     175inline uint64_t ntoh(uint64_t in) { return box_ntoh64(in); } 
     176inline uint32_t ntoh(uint32_t in) { return ntohl(in); } 
     177inline uint16_t ntoh(uint16_t in) { return ntohs(in); } 
     178inline uint8_t  ntoh(uint8_t in)  { return in; } 
     179inline int64_t  ntoh(int64_t in)  { return box_ntoh64(in); } 
     180inline int32_t  ntoh(int32_t in)  { return ntohl(in); } 
     181inline int16_t  ntoh(int16_t in)  { return ntohs(in); } 
     182inline int8_t   ntoh(int8_t in)   { return in; } 
     183 
    166184#endif // BOX__H 
    167185 
Note: See TracChangeset for help on using the changeset viewer.