25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
398 B

  1. // Copyright 2017 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build solaris
  5. package lif
  6. import "unsafe"
  7. var nativeEndian binaryByteOrder
  8. func init() {
  9. i := uint32(1)
  10. b := (*[4]byte)(unsafe.Pointer(&i))
  11. if b[0] == 1 {
  12. nativeEndian = littleEndian
  13. } else {
  14. nativeEndian = bigEndian
  15. }
  16. }