xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 15 20:17:14 UTC 2024


 hw/xfree86/x86emu/x86emu/debug.h |   37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

New commits:
commit 84407af615f962620191b76bc93ffb6818bc6cab
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Feb 27 10:44:06 2024 +0100

    xfree86: x86emu: fix missing Xfuncproto.h include in debug.h
    
    The header uses macros from Xfuncproto.h - right now it just works by pure
    accident since consumers of this header indirectly include Xfuncproto.h
    by totally different roads. This is a fragile programming style that deserved
    to be cleand up.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1331>

diff --git a/hw/xfree86/x86emu/x86emu/debug.h b/hw/xfree86/x86emu/x86emu/debug.h
index c32743c6a..98d85e9b9 100644
--- a/hw/xfree86/x86emu/x86emu/debug.h
+++ b/hw/xfree86/x86emu/x86emu/debug.h
@@ -39,6 +39,8 @@
 #ifndef __X86EMU_DEBUG_H
 #define __X86EMU_DEBUG_H
 
+#include <X11/Xfuncproto.h>
+
 /*---------------------- Macros and type definitions ----------------------*/
 
 /* checks to be enabled for "runtime" */
commit 045c9185f8c5f822c2d084222d95c70dfc6ff1d9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Feb 27 10:42:30 2024 +0100

    xfree86: x86emu: drop unnecessary extern C from debug.h
    
    Since we're not using C++ code, thus no trouble w/ name mangling, we don't
    need explicit extern "C" { ... } sections in the code. (If we would, we
    have to have it in many other places, too)
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1331>

diff --git a/hw/xfree86/x86emu/x86emu/debug.h b/hw/xfree86/x86emu/x86emu/debug.h
index 8660ebcb6..c32743c6a 100644
--- a/hw/xfree86/x86emu/x86emu/debug.h
+++ b/hw/xfree86/x86emu/x86emu/debug.h
@@ -182,27 +182,18 @@
 #define	DB(x)
 #endif
 
-/*-------------------------- Function Prototypes --------------------------*/
+void x86emu_inc_decoded_inst_len(int x);
+void x86emu_decode_printf(const char *x, ...) _X_ATTRIBUTE_PRINTF(1,2);
+void x86emu_just_disassemble(void);
+void x86emu_single_step(void);
+void x86emu_end_instr(void);
+void x86emu_dump_regs(void);
+void x86emu_dump_xregs(void);
+void x86emu_print_int_vect(u16 iv);
+void x86emu_instrument_instruction(void);
+void x86emu_check_ip_access(void);
+void x86emu_check_sp_access(void);
+void x86emu_check_mem_access(u32 p);
+void x86emu_check_data_access(uint s, uint o);
 
-#ifdef  __cplusplus
-extern "C" {                    /* Use "C" linkage when in C++ mode */
-#endif
-
-    extern void x86emu_inc_decoded_inst_len(int x);
-    extern void x86emu_decode_printf(const char *x, ...) _X_ATTRIBUTE_PRINTF(1,2);
-    extern void x86emu_just_disassemble(void);
-    extern void x86emu_single_step(void);
-    extern void x86emu_end_instr(void);
-    extern void x86emu_dump_regs(void);
-    extern void x86emu_dump_xregs(void);
-    extern void x86emu_print_int_vect(u16 iv);
-    extern void x86emu_instrument_instruction(void);
-    extern void x86emu_check_ip_access(void);
-    extern void x86emu_check_sp_access(void);
-    extern void x86emu_check_mem_access(u32 p);
-    extern void x86emu_check_data_access(uint s, uint o);
-
-#ifdef  __cplusplus
-}                               /* End of "C" linkage for C++           */
-#endif
 #endif                          /* __X86EMU_DEBUG_H */


More information about the xorg-commit mailing list