Commit Graph

11 Commits

Author SHA1 Message Date
Frediano Ziglio
4fc4c2db36 Do not check for HAVE_CONFIG_H
This should always be defined and including config.h is a requirement.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-05-02 09:33:05 +01:00
Christophe Fergeau
187df0cfdb backtrace: Add missing include
This fixes a warning about missing prototype for backtrace()

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-03-29 11:29:25 +01:00
Christophe Fergeau
b4e07c31cf build: Remove spice_common.h
Most users of spice_common.h don't need it, or only need log.h. It only
has a few users outside of spice-common. It's not very well defined
which headers it should contain. This commit removes spice_common.h in
favour of direct inclusion of the needed headers.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-07-06 06:46:15 +01:00
Victor Toso
397eb47816 Remove headers that are included in spice_common.h
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-01-07 12:46:42 +01:00
Christophe Fergeau
793e5d0350 backtrace: Don't attempt to call seteuid(0)
We are mostly likely not running as root, so this call will fail. As we are
supposed to check its return value as it's declared with
warn_unused_result, the current way of using it is wrong, so this commit just
removes the call.
2014-01-07 13:55:50 +01:00
Marc-André Lureau
c1403ee6bf Use a log handler to modify abort() behaviour
Be more library friendly, by not aborting in library errors.

spice_common now includes a proper log handler that will abort by
default when reaching a warning.

SPICE_ABORT_LEVEL can be changed to modify run-time abort level.

SPICE_DEBUG_LEVEL can be changed to be more verbose. By default, only
log level more importants than WARNING.

Only memory-related functions are allowed to abort(), since they are
not recoverable errors in the library.
2012-03-20 15:30:23 +01:00
Daniel P. Berrange
14ca077df3 Add missing includes of config.h
Not all files were including config.h
2012-03-20 15:25:55 +01:00
Daniel P. Berrange
457892cb9f Fix up copyright decl to always use 'Copyright (C) Red Hat, Inc.'
A couple of files were missing '(C)' in the copyright header
2012-03-20 15:25:55 +01:00
Alon Levy
db2057fa4c common/backtrace: for mingw32 no pipe/wait_pid, just disable 2012-03-20 15:25:55 +01:00
Christophe Fergeau
673ab9b950 fix make distcheck 2012-03-20 15:25:53 +01:00
Alon Levy
cb4c660655 common: add backtrace via gstack or glibc backtrace
Add a backtrace printing function copied from xserver os/backtrace.c
that uses gstack, and if that isn't found then glibc's backtrace.
Used in ASSERT, tested on F15.
2012-03-20 15:25:53 +01:00