Print this page
5007142 Add ntohll and htonll to sys/byteorder.h
6717509 Need to use bswap/bswapq for byte swap of 64-bit integer on x32/x64
PSARC 2008/474

@@ -25,12 +25,10 @@
  */
 
 #ifndef _T10_SPC_H
 #define _T10_SPC_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*

@@ -44,10 +42,12 @@
  * in fixed format sense data
  */
 #define FIXED_SENSE_ADDL_INFO_LEN 0xFFFFFFFF
 #define INFORMATION_SENSE_DESCR sizeof (struct scsi_information_sense_descr)
 
+#include <sys/types.h>
+#include <netinet/in.h>
 #include <sys/scsi/generic/inquiry.h>
 #include <sys/scsi/generic/mode.h>
 
 /*
  * SPC Command Functions

@@ -82,19 +82,10 @@
  */
 #define SPC_SENSE_EOM   0x01
 #define SPC_SENSE_FM    0x02
 #define SPC_SENSE_ILI   0x04
 
-#ifdef _BIG_ENDIAN
-#define htonll(x)   (x)
-#define ntohll(x)   (x)
-#else
-#define htonll(x)   ((((unsigned long long)htonl(x & 0xffffffff)) << 32) + \
-                    htonl(x >> 32))
-#define ntohll(x)   ((((unsigned long long)ntohl(x)) << 32) + ntohl(x >> 32))
-#endif
-
 /*
  * []------------------------------------------------------------------[]
  * | SPC-3, revision 21c -- ASC/ASCQ values                             |
  * | The full tables can be found in Appendix D (numerical order) or    |
  * | section 4.5.6 (alphabetical order). There are close to fifteen     |