Remove an unreachable preprocessor directive
cmake sets HAVE_DPMS_PROTOTYPES unconditionally to 1 if we have the dpms headers. So code inside HAVE_X11_EXTENSIONS_DPMS_H never needs to check for it. And since there's only one place that cared for this, we can remove the define in cmake as well.
This commit is contained in:
parent
f3eb89121d
commit
1474f04f53
|
@ -195,11 +195,6 @@ 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)
|
|
||||||
# Assume that function prototypes declared, when include exists.
|
|
||||||
set (HAVE_DPMS_PROTOTYPES 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT HAVE_X11_EXTENSIONS_XTEST_H)
|
if (NOT HAVE_X11_EXTENSIONS_XTEST_H)
|
||||||
message (FATAL_ERROR "Missing header: X11/extensions/XTest.h")
|
message (FATAL_ERROR "Missing header: X11/extensions/XTest.h")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -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}
|
||||||
|
|
||||||
|
|
|
@ -31,22 +31,6 @@
|
||||||
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue