aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/darwin.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-23 12:30:27 +0000
committermarha <marha@users.sourceforge.net>2011-05-23 12:30:27 +0000
commitae87f2594b9439cb63a6b52e42e09504b687aea3 (patch)
treea0a59232ccde314cb2032d2856f1eb3b8701d3f8 /xorg-server/hw/xquartz/darwin.c
parent52011cfedaa930d61d8f60b283a2051093727582 (diff)
downloadvcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.gz
vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.bz2
vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.zip
xserver git update 23 May 2011
Diffstat (limited to 'xorg-server/hw/xquartz/darwin.c')
-rw-r--r--xorg-server/hw/xquartz/darwin.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c
index 50234f243..fa8d4ced2 100644
--- a/xorg-server/hw/xquartz/darwin.c
+++ b/xorg-server/hw/xquartz/darwin.c
@@ -60,6 +60,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdarg.h>
#define HAS_UTSNAME 1
#include <sys/utsname.h>
@@ -76,9 +77,31 @@
#include "quartzKeyboard.h"
#include "quartz.h"
-#ifdef ENABLE_DEBUG_LOG
-FILE *debug_log_fp = NULL;
-#endif
+aslclient aslc;
+
+void debug_asl (const char *file, const char *function, int line, const char *fmt, ...) {
+ va_list args;
+ aslmsg msg = asl_new(ASL_TYPE_MSG);
+
+ if(msg) {
+ char *_line;
+
+ asl_set(msg, "File", file);
+ asl_set(msg, "Function", function);
+ asprintf(&_line, "%d", line);
+ if(_line) {
+ asl_set(msg, "Line", _line);
+ free(_line);
+ }
+ }
+
+ va_start(args, fmt);
+ asl_vlog(aslc, msg, ASL_LEVEL_DEBUG, fmt, args);
+ va_end(args);
+
+ if(msg)
+ asl_free(msg);
+}
/*
* X server shared global variables
@@ -749,8 +772,8 @@ void ddxGiveUp( void )
* made to restore all original setting of the displays. Also all devices
* are closed.
*/
-void AbortDDX( void )
-{
+_X_NORETURN
+void AbortDDX( void ) {
ErrorF( " AbortDDX\n" );
OsAbort();
}