[cairo] [PATCH 4/5] perf: Fixes for Windows build.
Zoxc
zoxc32 at gmail.com
Thu Jun 24 11:31:54 PDT 2010
---
perf/cairo-perf-trace.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index 3d76235..eea12f5 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -44,11 +44,19 @@
#include "../src/cairo-error-private.h"
/* For basename */
+#ifdef _WIN32
+#include <basename.h>
+#endif
#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif
+
#include <ctype.h> /* isspace() */
+#ifdef _WIN32
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
@@ -456,6 +464,10 @@ usage (const char *argv0)
}
#ifndef __USE_GNU
+#ifdef _WIN32
+#include <windows.h>
+typedef SSIZE_T ssize_t;
+#endif
#define POORMANS_GETLINE_BUFFER_SIZE (65536)
static ssize_t
getline (char **lineptr,
@@ -855,4 +867,3 @@ _cairo_error (cairo_status_t status)
return status;
}
#endif
-
--
1.7.0.2.msysgit.0
More information about the cairo
mailing list