#include "Profiling.h"
#include "llvm/Analysis/ProfileInfoTypes.h"
#include <sys/types.h>
-#include <unistd.h>
+#if !defined(_MSC_VER) && !defined(__MINGW32__)\r
+#include <unistd.h>\r
+#else\r
+#include <io.h>\r
+#endif\r
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
+// Must use __inline in Microsoft C
+#if defined(_MSC_VER)\r
+#define inline __inline\r
+#endif\r
+
/* note that this is used for functions with large path counts,
but it is unlikely those paths will ALL be executed */
#define ARBITRARY_HASH_BIN_COUNT 100
* +-----------------+-----------------+
*
*/
-static void pathProfAtExitHandler() {
+static void pathProfAtExitHandler(void) {
int outFile = getOutFile();
uint32_t i;
uint32_t header[2] = { PathInfo, 0 };