diff options
author | Ben Byer <bbyer@freedesktop.org> | 2009-09-27 10:35:53 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-09-27 23:32:32 -0700 |
commit | 2b023a0947e2bd31fd009f22ff33b504d483c76c (patch) | |
tree | cfa26bb4930e172900e2a86207f45409b7d441f4 | |
parent | e39bd3ddd13c1122e94139f4a5d778a081db44cb (diff) |
Add (ok, fix) support for DTrace under OS X
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dix/Makefile.am | 2 | ||||
-rw-r--r-- | dix/Xserver.d | 7 | ||||
-rw-r--r-- | os/Makefile.am | 2 |
5 files changed, 12 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index c65f4a649..23b2ad52c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ missing ylwrap xorg-server.pc stamp-h? +dix/Xserver-dtrace.h do-not-use-config.h do-not-use-config.h.in afb/afbbltC.c diff --git a/configure.ac b/configure.ac index b1acd8c47..ef3718387 100644 --- a/configure.ac +++ b/configure.ac @@ -1038,7 +1038,7 @@ AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) AC_DEFINE(PIXPRIV, 1, [Support pixmap privates]) -if test "x$WDTRACE" != "xno" ; then +if test "x$WDTRACE" != "xno" && test "x$XQUARTZ" = "xno"; then DIX_LIB='$(top_builddir)/dix/dix.O' OS_LIB='$(top_builddir)/os/os.O' else diff --git a/dix/Makefile.am b/dix/Makefile.am index 147ce18cd..7e065d990 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -48,6 +48,7 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ || cp Xserver-dtrace.h.in $@ +if !XQUARTZ # Generate dtrace object code for probes in libdix dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o @@ -57,6 +58,7 @@ noinst_PROGRAMS = dix.O dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) ld -r -o $@ .libs/*.o endif +endif dix.c: touch $@ diff --git a/dix/Xserver.d b/dix/Xserver.d index e4c9b8320..cea97e908 100644 --- a/dix/Xserver.d +++ b/dix/Xserver.d @@ -29,8 +29,13 @@ /* * Xserver dtrace provider definition */ - +#ifdef __APPLE__ +#define string char * +#define pid_t uint32_t +#define zoneid_t uint32_t +#else #include <sys/types.h> +#endif provider Xserver { /* reqType, data, length, client id, request buffer */ diff --git a/os/Makefile.am b/os/Makefile.am index d2a989782..28c70dc1d 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -54,6 +54,7 @@ libcwrapper_la_CFLAGS = \ EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \ $(XCSECURITY_SRCS) $(XDMCP_SRCS) $(STRLCAT_SRCS) +if !XQUARTZ if XSERVER_DTRACE # Generate dtrace object code for probes in libos & libdix dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS) @@ -64,6 +65,7 @@ noinst_PROGRAMS = os.O os.O: dtrace.o $(am_libos_la_OBJECTS) ld -r -o $@ dtrace.o .libs/*.o endif +endif os.c: touch $@ |