Skip to content

Commit

Permalink
OSX Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
scm committed Sep 21, 2017
1 parent b982af1 commit 9c855dd
Show file tree
Hide file tree
Showing 11 changed files with 880 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .gitignore
Expand Up @@ -607,3 +607,67 @@ TSWLatexianTemp*
*-tags.tex

# End of https://www.gitignore.io/api/latex


# Created by https://www.gitignore.io/api/osx,xcode

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno

# End of https://www.gitignore.io/api/osx,xcode
8 changes: 8 additions & 0 deletions common/thumbnailerCore.h
Expand Up @@ -11,13 +11,21 @@
#define HDF_FILE_ENDING ".hdf5"

#ifndef WIN32
#ifndef __APPLE__
#include <endian.h>
#else
#include <libkern/OSByteOrder.h>
#endif
#else
#include <winsock.h>
#endif

#ifndef WIN32
#ifdef __APPLE__
#define get_correct_byteorder(x) OSSwapBigToHostInt64(x)
#else
#define get_correct_byteorder(x) be64toh(x)
#endif
#else
// If the system is big endian just return the value else swap it
#define get_correct_byteorder(x) htonl(47) == 47 ? x : _byteswap_uint64(x)
Expand Down

0 comments on commit 9c855dd

Please sign in to comment.