mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Merge branch 'sigsafe-logging-varargs'
This merge includes a minor fixup for '%p' arguments; must cast to uintptr_t instead of uint64_t as we use -Werror=pointer-to-int-cast which complains when doing a cast (even explicitly) from a pointer to an integer of different size.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#ifndef _XSERV_GLOBAL_H_
|
||||
#define _XSERV_GLOBAL_H_
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "window.h" /* for WindowPtr */
|
||||
|
||||
/* Global X server variables that are visible to mi, dix, os, and ddx */
|
||||
@@ -23,6 +25,7 @@ extern _X_EXPORT int GrabInProgress;
|
||||
extern _X_EXPORT Bool noTestExtensions;
|
||||
extern _X_EXPORT char *SeatId;
|
||||
extern _X_EXPORT char *ConnectionInfo;
|
||||
extern _X_EXPORT sig_atomic_t inSignalContext;
|
||||
|
||||
#ifdef DPMSExtension
|
||||
extern _X_EXPORT CARD32 DPMSStandbyTime;
|
||||
|
||||
@@ -229,6 +229,8 @@ pad_to_int32(const int bytes)
|
||||
}
|
||||
|
||||
extern char **xstrtokenize(const char *str, const char *separators);
|
||||
extern void FormatUInt64(uint64_t num, char *string);
|
||||
extern void FormatUInt64Hex(uint64_t num, char *string);
|
||||
|
||||
/**
|
||||
* Compare the two version numbers comprising of major.minor.
|
||||
@@ -369,10 +371,10 @@ extern _X_EXPORT unsigned long serverGeneration;
|
||||
/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
|
||||
#define __BUG_WARN_MSG(cond, with_msg, ...) \
|
||||
do { if (cond) { \
|
||||
ErrorF("BUG: triggered 'if (" #cond ")'\n"); \
|
||||
ErrorF("BUG: %s:%d in %s()\n", \
|
||||
__FILE__, __LINE__, __func__); \
|
||||
if (with_msg) ErrorF(__VA_ARGS__); \
|
||||
ErrorFSigSafe("BUG: triggered 'if (" #cond ")'\n"); \
|
||||
ErrorFSigSafe("BUG: %s:%u in %s()\n", \
|
||||
__FILE__, __LINE__, __func__); \
|
||||
if (with_msg) ErrorFSigSafe(__VA_ARGS__); \
|
||||
xorg_backtrace(); \
|
||||
} } while(0)
|
||||
|
||||
|
||||
13
include/os.h
13
include/os.h
@@ -49,6 +49,7 @@ SOFTWARE.
|
||||
|
||||
#include "misc.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SCREEN_SAVER_ON 0
|
||||
@@ -604,6 +605,12 @@ _X_ATTRIBUTE_PRINTF(3, 4);
|
||||
extern _X_EXPORT void
|
||||
LogMessage(MessageType type, const char *format, ...)
|
||||
_X_ATTRIBUTE_PRINTF(2, 3);
|
||||
extern _X_EXPORT void
|
||||
LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
|
||||
_X_ATTRIBUTE_PRINTF(3, 4);
|
||||
extern _X_EXPORT void
|
||||
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
|
||||
_X_ATTRIBUTE_PRINTF(3, 0);
|
||||
|
||||
extern _X_EXPORT void
|
||||
LogVHdrMessageVerb(MessageType type, int verb,
|
||||
@@ -649,6 +656,12 @@ extern _X_EXPORT void
|
||||
ErrorF(const char *f, ...)
|
||||
_X_ATTRIBUTE_PRINTF(1, 2);
|
||||
extern _X_EXPORT void
|
||||
VErrorFSigSafe(const char *f, va_list args)
|
||||
_X_ATTRIBUTE_PRINTF(1, 0);
|
||||
extern _X_EXPORT void
|
||||
ErrorFSigSafe(const char *f, ...)
|
||||
_X_ATTRIBUTE_PRINTF(1, 2);
|
||||
extern _X_EXPORT void
|
||||
LogPrintMarkers(void);
|
||||
|
||||
extern _X_EXPORT void
|
||||
|
||||
Reference in New Issue
Block a user