Bug 9022

Summary: Compile error with --enable-debug at x86emu/debug.c (missing #include)
Product: xorg Reporter: Christian Hamar <krics>
Component: Server/GeneralAssignee: Daniel Stone <daniel>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: mmokrejs
Version: 7.2 (2007.02)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Christian Hamar 2006-11-14 04:47:15 UTC
Hey there. I just found a bug in xorg-server 1.2.99.0 version when i wanted to
use --enable-debug flag. (Runnin / compiling on amd64, but dunno if its matters
or not)

It drops a compile error like:

../../x86emu/debug.c:258: error: 'stdin' undeclared (first use in this function)

The full path where is got the error: xorg-server-1.2.99.0/hw/xfree86/x86emu/debug.c

An easy fix for this adding #include <stdio.h> to that file (i dont know i added
it to right place, but it solved this problem) : 

diff -Naur xorg-server-1.2.99.0.orig/hw/xfree86/x86emu/debug.c
xorg-server-1.2.99.0/hw/xfree86/x86emu/debug.c
--- xorg-server-1.2.99.0.orig/hw/xfree86/x86emu/debug.c	2006-07-20
22:27:48.000000000 +0200
+++ xorg-server-1.2.99.0/hw/xfree86/x86emu/debug.c	2006-11-14 11:50:10.000000000
+0100
@@ -38,6 +38,7 @@
 ****************************************************************************/
 
 #include "x86emu/x86emui.h"
+#include <stdio.h>
 #ifndef NO_SYS_HEADERS
 #include <stdarg.h>
 #include <stdlib.h>
Comment 1 Daniel Stone 2007-02-27 01:34:40 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Julien Cristau 2010-03-21 07:43:46 UTC
Looks like this was fixed as part of:

commit 028a00bc518dc6908839e8ce7c50ab1837100945
Author: Adam Jackson <ajax@benzedrine.nwnk.net>
Date:   Mon Jul 2 18:41:55 2007 -0400

    Make x86emu's I/O cycle tracing more useful.
    
    Print debug messages only when the appropriate debug bit is set in the
    8086 state vector, so you can focus in on the call you're actually
    interested in.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.