[PATCH 2/3] Solaris: Move shared declarations to xf86_OSlib.h
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Dec 17 20:50:02 PST 2014
Gets rid of gcc 4.8 warnings:
xf86AutoConfig.c:211:9: warning: nested extern declaration of
'xf86SolarisFbDev' [-Wnested-externs]
sun_VTsw.c:44:1: warning: no previous prototype for 'xf86VTRelease'
[-Wmissing-prototypes]
sun_VTsw.c:59:1: warning: no previous prototype for 'xf86VTAcquire'
[-Wmissing-prototypes]
and ensures caller & definition stay in sync.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
hw/xfree86/common/xf86AutoConfig.c | 1 -
hw/xfree86/os-support/solaris/sun_init.c | 2 --
hw/xfree86/os-support/xf86_OSlib.h | 5 +++++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 03dad15..1450afb 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -208,7 +208,6 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
if (xf86Info.consoleFd >= 0 && (i < (nmatches - 1))) {
struct vis_identifier visid;
const char *cp;
- extern char xf86SolarisFbDev[PATH_MAX];
int iret;
SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid));
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index 2e0af22..cc50f36 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -52,8 +52,6 @@ static Bool UseConsole = FALSE;
static int VTnum = -1;
static int xf86StartVT = -1;
static int vtEnabled = 0;
-extern void xf86VTAcquire(int);
-extern void xf86VTRelease(int);
#endif
/* Device to open as xf86Info.consoleFd */
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 3a83f34..6190fe6 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -134,10 +134,15 @@
#endif
#include <sys/kd.h>
#include <sys/vt.h>
+
+extern _X_HIDDEN void xf86VTAcquire(int);
+extern _X_HIDDEN void xf86VTRelease(int);
#endif
#if defined(sun)
#include <sys/fbio.h>
+extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
+
#include <sys/kbd.h>
#include <sys/kbio.h>
--
1.7.9.2
More information about the xorg-devel
mailing list