forked from OSchip/llvm-project
Various small changes for build of LLDB on Visual Studio 2013 RC (MSVC12)
llvm-svn: 191116
This commit is contained in:
parent
1fd7ec75fc
commit
6957195ae5
|
@ -12,6 +12,7 @@
|
|||
|
||||
// C Includes
|
||||
#include <stdint.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
|
||||
// BEGIN: MinGW work around
|
||||
|
@ -19,6 +20,7 @@
|
|||
#include <pthread.h>
|
||||
#endif
|
||||
// END: MinGW work around
|
||||
#endif
|
||||
|
||||
// C++ Includes
|
||||
// Other libraries and framework includes
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
const char *description;
|
||||
};
|
||||
typedef UniqueCStringMap<EnumeratorInfo> EnumerationMap;
|
||||
typedef typename EnumerationMap::Entry EnumerationMapEntry;
|
||||
typedef EnumerationMap::Entry EnumerationMapEntry;
|
||||
|
||||
OptionValueEnumeration (const OptionEnumValueElement *enumerators, enum_type value);
|
||||
|
||||
|
|
|
@ -114,6 +114,11 @@
|
|||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// ignore GCC function attributes
|
||||
#define __attribute__(X)
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -35,8 +35,10 @@
|
|||
// things should be defined. Currently MacOSX is being assumed by default
|
||||
// since that is what lldb was first developed for.
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
#include "lldb/Host/windows/windows.h"
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <set>
|
||||
#include <string.h>
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "lldb/Host/windows/windows.h"
|
||||
#endif
|
||||
|
||||
// C++ Includes
|
||||
// Other libraries and framework includes
|
||||
// Project includes
|
||||
|
@ -119,10 +124,20 @@ TimeValue
|
|||
TimeValue::Now()
|
||||
{
|
||||
uint32_t seconds, nanoseconds;
|
||||
#if _MSC_VER
|
||||
SYSTEMTIME st;
|
||||
GetSystemTime(&st);
|
||||
nanoseconds = st.wMilliseconds * 1000000;
|
||||
FILETIME ft;
|
||||
SystemTimeToFileTime(&st, &ft);
|
||||
|
||||
seconds = ((((uint64_t)ft.dwHighDateTime) << 32 | ft.dwLowDateTime) / 10000000) - 11644473600ULL;
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
seconds = tv.tv_sec;
|
||||
nanoseconds = tv.tv_usec * NanoSecPerMicroSec;
|
||||
#endif
|
||||
TimeValue now(seconds, nanoseconds);
|
||||
return now;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue