X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=myutils.h;h=6374c8bee360033277aba81f73e836ef9a86cc13;hb=75962c819c16814e5c2340d99af1aa62e564dc20;hp=61220546b81894283bb6350f5c2c51ecc8800cb2;hpb=1e8d08e96f4fe99604a6b3502568de464bf60891;p=mothur.git diff --git a/myutils.h b/myutils.h index 6122054..6374c8b 100644 --- a/myutils.h +++ b/myutils.h @@ -16,30 +16,32 @@ #include #include -#ifndef _MSC_VER +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#else #include #endif using namespace std; -#ifdef _MSC_VER -#include +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#else +//#include #pragma warning(disable: 4996) // deprecated functions #define _CRT_SECURE_NO_DEPRECATE 1 #endif -#if defined(_DEBUG) && !defined(DEBUG) +//#if defined(_DEBUG) && !defined(DEBUG) #define DEBUG 1 -#endif +//#endif -#if defined(DEBUG) && !defined(_DEBUG) +//#if defined(DEBUG) && !defined(_DEBUG) #define _DEBUG 1 -#endif +//#endif -#ifndef NDEBUG +//#ifndef NDEBUG #define DEBUG 1 #define _DEBUG 1 -#endif +//#endif typedef unsigned char byte; typedef unsigned short uint16; @@ -49,10 +51,10 @@ typedef double float32; typedef signed char int8; typedef unsigned char uint8; -#ifdef _MSC_VER +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -typedef __int64 int64; -typedef unsigned __int64 uint64; +typedef long long int64; +typedef unsigned long long uint64; #define INT64_PRINTF "lld" #define UINT64_PRINTF "llu" @@ -66,6 +68,7 @@ typedef unsigned __int64 uint64; #define SIZE_T_PRINTFX "x" #define OFF64_T_PRINTFX "llx" + #elif defined(__x86_64__) typedef long int64; @@ -85,8 +88,8 @@ typedef unsigned long uint64; #else -typedef long long int64; -typedef unsigned long long uint64; +typedef __int64 int64; +typedef unsigned __int64 uint64; #define INT64_PRINTF "lld" #define UINT64_PRINTF "llu" @@ -99,6 +102,7 @@ typedef unsigned long long uint64; #define SIZE_T_PRINTFX "x" #define OFF64_T_PRINTFX "llx" + #endif #define d64 INT64_PRINTF @@ -160,7 +164,8 @@ void myfree(void *p); bool myisatty(int fd); -#ifdef _MSC_VER +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#else #define off_t __int64 #endif