Merge pull request #981 from whot/wip/simplify-ifdefs
Remove some #defines that had no useful effect
This commit is contained in:
commit
829ff7975b
|
@ -195,9 +195,8 @@ if (UNIX)
|
||||||
check_include_files ("X11/extensions/XInput2.h" HAVE_XI2)
|
check_include_files ("X11/extensions/XInput2.h" HAVE_XI2)
|
||||||
check_include_files ("dns_sd.h" HAVE_DNSSD)
|
check_include_files ("dns_sd.h" HAVE_DNSSD)
|
||||||
|
|
||||||
if (HAVE_X11_EXTENSIONS_DPMS_H)
|
if (NOT HAVE_X11_EXTENSIONS_XTEST_H)
|
||||||
# Assume that function prototypes declared, when include exists.
|
message (FATAL_ERROR "Missing header: X11/extensions/XTest.h")
|
||||||
set (HAVE_DPMS_PROTOTYPES 1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT HAVE_X11_XKBLIB_H)
|
if (NOT HAVE_X11_XKBLIB_H)
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
/* Define if your compiler has standard C++ library support. */
|
/* Define if your compiler has standard C++ library support. */
|
||||||
#cmakedefine HAVE_CXX_STDLIB ${HAVE_CXX_STDLIB}
|
#cmakedefine HAVE_CXX_STDLIB ${HAVE_CXX_STDLIB}
|
||||||
|
|
||||||
/* Define if the <X11/extensions/dpms.h> header file declares function prototypes. */
|
|
||||||
#cmakedefine HAVE_DPMS_PROTOTYPES ${HAVE_DPMS_PROTOTYPES}
|
|
||||||
|
|
||||||
/* Define if you have a working `getpwuid_r` function. */
|
/* Define if you have a working `getpwuid_r` function. */
|
||||||
#cmakedefine HAVE_GETPWUID_R ${HAVE_GETPWUID_R}
|
#cmakedefine HAVE_GETPWUID_R ${HAVE_GETPWUID_R}
|
||||||
|
|
||||||
|
@ -115,9 +112,6 @@
|
||||||
/* Define to 1 if you have the <X11/extensions/XKBstr.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/XKBstr.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XKBSTR_H ${HAVE_X11_EXTENSIONS_XKBSTR_H}
|
#cmakedefine HAVE_X11_EXTENSIONS_XKBSTR_H ${HAVE_X11_EXTENSIONS_XKBSTR_H}
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
|
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XTEST_H ${HAVE_X11_EXTENSIONS_XTEST_H}
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
||||||
#cmakedefine HAVE_X11_XKBLIB_H ${HAVE_X11_XKBLIB_H}
|
#cmakedefine HAVE_X11_XKBLIB_H ${HAVE_X11_XKBLIB_H}
|
||||||
|
|
||||||
|
@ -160,8 +154,5 @@
|
||||||
/* Define to 1 if your <sys/time.h> declares `struct tm`. */
|
/* Define to 1 if your <sys/time.h> declares `struct tm`. */
|
||||||
#cmakedefine TM_IN_SYS_TIME ${TM_IN_SYS_TIME}
|
#cmakedefine TM_IN_SYS_TIME ${TM_IN_SYS_TIME}
|
||||||
|
|
||||||
/* Define to 1 if the X Window System is missing or not being used. */
|
|
||||||
#cmakedefine X_DISPLAY_MISSING ${X_DISPLAY_MISSING}
|
|
||||||
|
|
||||||
/* Define to `unsigned int` if <sys/types.h> does not define. */
|
/* Define to `unsigned int` if <sys/types.h> does not define. */
|
||||||
#cmakedefine size_t ${size_t}
|
#cmakedefine size_t ${size_t}
|
||||||
|
|
|
@ -3,39 +3,31 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/X.h>
|
||||||
# error X11 is required to build barrier
|
#include <X11/Xutil.h>
|
||||||
#else
|
#define XK_MISCELLANY
|
||||||
# include <X11/X.h>
|
#define XK_XKB_KEYS
|
||||||
# include <X11/Xutil.h>
|
#include <X11/keysymdef.h>
|
||||||
# define XK_MISCELLANY
|
#if HAVE_X11_EXTENSIONS_DPMS_H
|
||||||
# define XK_XKB_KEYS
|
extern "C" {
|
||||||
# include <X11/keysymdef.h>
|
# include <X11/extensions/dpms.h>
|
||||||
# if HAVE_X11_EXTENSIONS_DPMS_H
|
}
|
||||||
extern "C" {
|
#endif
|
||||||
# include <X11/extensions/dpms.h>
|
#include <X11/extensions/XTest.h>
|
||||||
}
|
#if HAVE_X11_EXTENSIONS_XINERAMA_H
|
||||||
# endif
|
// Xinerama.h may lack extern "C" for inclusion by C++
|
||||||
# if HAVE_X11_EXTENSIONS_XTEST_H
|
extern "C" {
|
||||||
# include <X11/extensions/XTest.h>
|
# include <X11/extensions/Xinerama.h>
|
||||||
# else
|
}
|
||||||
# error The XTest extension is required to build barrier
|
#endif
|
||||||
# endif
|
#if HAVE_X11_EXTENSIONS_XRANDR_H
|
||||||
# if HAVE_X11_EXTENSIONS_XINERAMA_H
|
# include <X11/extensions/Xrandr.h>
|
||||||
// Xinerama.h may lack extern "C" for inclusion by C++
|
#endif
|
||||||
extern "C" {
|
#if HAVE_XKB_EXTENSION
|
||||||
# include <X11/extensions/Xinerama.h>
|
# include <X11/XKBlib.h>
|
||||||
}
|
#endif
|
||||||
# endif
|
#ifdef HAVE_XI2
|
||||||
# if HAVE_X11_EXTENSIONS_XRANDR_H
|
# include <X11/extensions/XInput2.h>
|
||||||
# include <X11/extensions/Xrandr.h>
|
|
||||||
# endif
|
|
||||||
# if HAVE_XKB_EXTENSION
|
|
||||||
# include <X11/XKBlib.h>
|
|
||||||
# endif
|
|
||||||
# ifdef HAVE_XI2
|
|
||||||
# include <X11/extensions/XInput2.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class IXWindowsImpl {
|
class IXWindowsImpl {
|
||||||
|
|
|
@ -25,11 +25,7 @@
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
#include "XWindowsImpl.h"
|
#include "XWindowsImpl.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
|
||||||
#else
|
|
||||||
# include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class IXWindowsClipboardConverter;
|
class IXWindowsClipboardConverter;
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,7 @@
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
#include "XWindowsImpl.h"
|
#include "XWindowsImpl.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
|
||||||
#else
|
|
||||||
# include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class IEventQueue;
|
class IEventQueue;
|
||||||
|
|
||||||
|
|
|
@ -24,18 +24,14 @@
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/X.h>
|
||||||
# error X11 is required to build barrier
|
#include <X11/Xutil.h>
|
||||||
#else
|
#define XK_MISCELLANY
|
||||||
# include <X11/X.h>
|
#define XK_XKB_KEYS
|
||||||
# include <X11/Xutil.h>
|
#include <X11/keysymdef.h>
|
||||||
# define XK_MISCELLANY
|
|
||||||
# define XK_XKB_KEYS
|
|
||||||
# include <X11/keysymdef.h>
|
|
||||||
#if HAVE_XKB_EXTENSION
|
#if HAVE_XKB_EXTENSION
|
||||||
# include <X11/XKBlib.h>
|
# include <X11/XKBlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
static const size_t ModifiersFromXDefaultSize = 32;
|
static const size_t ModifiersFromXDefaultSize = 32;
|
||||||
|
|
||||||
|
|
|
@ -23,18 +23,10 @@
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
#include "XWindowsImpl.h"
|
#include "XWindowsImpl.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
#include <X11/extensions/XTest.h>
|
||||||
#else
|
#if HAVE_XKB_EXTENSION
|
||||||
# include <X11/Xlib.h>
|
# include <X11/extensions/XKBstr.h>
|
||||||
# if HAVE_X11_EXTENSIONS_XTEST_H
|
|
||||||
# include <X11/extensions/XTest.h>
|
|
||||||
# else
|
|
||||||
# error The XTest extension is required to build barrier
|
|
||||||
# endif
|
|
||||||
# if HAVE_XKB_EXTENSION
|
|
||||||
# include <X11/extensions/XKBstr.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class IEventQueue;
|
class IEventQueue;
|
||||||
|
|
|
@ -24,11 +24,7 @@
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
#include "XWindowsImpl.h"
|
#include "XWindowsImpl.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
|
||||||
#else
|
|
||||||
# include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class XWindowsClipboard;
|
class XWindowsClipboard;
|
||||||
class XWindowsKeyState;
|
class XWindowsKeyState;
|
||||||
|
|
|
@ -26,31 +26,11 @@
|
||||||
#include "base/TMethodEventJob.h"
|
#include "base/TMethodEventJob.h"
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
#include <X11/extensions/XTest.h>
|
||||||
# include <X11/extensions/XTest.h>
|
|
||||||
#else
|
|
||||||
# error The XTest extension is required to build barrier
|
|
||||||
#endif
|
|
||||||
#if HAVE_X11_EXTENSIONS_DPMS_H
|
#if HAVE_X11_EXTENSIONS_DPMS_H
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# include <X11/Xmd.h>
|
# include <X11/Xmd.h>
|
||||||
# include <X11/extensions/dpms.h>
|
# include <X11/extensions/dpms.h>
|
||||||
# if !HAVE_DPMS_PROTOTYPES
|
|
||||||
# undef DPMSModeOn
|
|
||||||
# undef DPMSModeStandby
|
|
||||||
# undef DPMSModeSuspend
|
|
||||||
# undef DPMSModeOff
|
|
||||||
# define DPMSModeOn 0
|
|
||||||
# define DPMSModeStandby 1
|
|
||||||
# define DPMSModeSuspend 2
|
|
||||||
# define DPMSModeOff 3
|
|
||||||
extern Bool DPMSQueryExtension(Display *, int *, int *);
|
|
||||||
extern Bool DPMSCapable(Display *);
|
|
||||||
extern Status DPMSEnable(Display *);
|
|
||||||
extern Status DPMSDisable(Display *);
|
|
||||||
extern Status DPMSForceLevel(Display *, CARD16);
|
|
||||||
extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,7 @@
|
||||||
#include "common/stdmap.h"
|
#include "common/stdmap.h"
|
||||||
#include "XWindowsImpl.h"
|
#include "XWindowsImpl.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
|
||||||
#else
|
|
||||||
# include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class Event;
|
class Event;
|
||||||
class EventQueueTimer;
|
class EventQueueTimer;
|
||||||
|
|
|
@ -22,11 +22,7 @@
|
||||||
#include "common/stdmap.h"
|
#include "common/stdmap.h"
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
|
|
||||||
#if X_DISPLAY_MISSING
|
#include <X11/Xlib.h>
|
||||||
# error X11 is required to build barrier
|
|
||||||
#else
|
|
||||||
# include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue