aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/solaris
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/solaris')
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/Makefile.am21
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/Makefile.in114
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c110
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_agp.c27
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_apm.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_bell.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_init.c199
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_vid.c6
11 files changed, 301 insertions, 188 deletions
diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
index a4ef67b91..5163f4423 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
+++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,33 +1,32 @@
-if SOLARIS_USL_CONSOLE
-VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c
+if SOLARIS_VT
+VTSW_SRC = sun_VTsw.c
else
VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
endif
-# TODO: Don't build agpgart on SPARC
-#if defined(i386Architecture) || defined(AMD64Architecture)
+if AGP
AGP_SRC = sun_agp.c
-#else
-#AGP_SRC = $(srcdir)/../shared/agp_noop.c
-#endif
+else
+AGP_SRC = $(srcdir)/../shared/agp_noop.c
+endif
SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S
DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il
solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S
- $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@
+ $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@
noinst_LTLIBRARIES = libsolaris.la
libsolaris_la_SOURCES = sun_init.c \
sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
$(srcdir)/../shared/kmod_noop.c \
- $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \
- $(srcdir)/../shared/stdResource.c \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/sigio.c \
$(srcdir)/../shared/vidmem.c \
$(VTSW_SRC)
nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
-sdk_HEADERS = agpgart.h
+sdk_HEADERS =
nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in
index 74baaea27..ced1ff70d 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in
+++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in
@@ -39,8 +39,11 @@ subdir = hw/xfree86/os-support/solaris
DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -50,23 +53,25 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
- $(top_builddir)/include/kdrive-config.h
+ $(top_builddir)/include/kdrive-config.h \
+ $(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsolaris_la_LIBADD =
am__libsolaris_la_SOURCES_DIST = sun_init.c sun_vid.c sun_bell.c \
- sun_agp.c sun_apm.c $(srcdir)/../shared/kmod_noop.c \
- $(srcdir)/../shared/posix_tty.c \
- $(srcdir)/../shared/sigiostubs.c \
- $(srcdir)/../shared/stdResource.c $(srcdir)/../shared/vidmem.c \
- $(srcdir)/../shared/VTsw_noop.c $(srcdir)/../shared/VTsw_usl.c
-am__objects_1 = sun_agp.lo
-@SOLARIS_USL_CONSOLE_FALSE@am__objects_2 = VTsw_noop.lo
-@SOLARIS_USL_CONSOLE_TRUE@am__objects_2 = VTsw_usl.lo
+ $(srcdir)/../shared/agp_noop.c sun_agp.c sun_apm.c \
+ $(srcdir)/../shared/kmod_noop.c \
+ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigio.c \
+ $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/VTsw_noop.c \
+ sun_VTsw.c
+@AGP_FALSE@am__objects_1 = agp_noop.lo
+@AGP_TRUE@am__objects_1 = sun_agp.lo
+@SOLARIS_VT_FALSE@am__objects_2 = VTsw_noop.lo
+@SOLARIS_VT_TRUE@am__objects_2 = sun_VTsw.lo
am_libsolaris_la_OBJECTS = sun_init.lo sun_vid.lo sun_bell.lo \
- $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo \
- sigiostubs.lo stdResource.lo vidmem.lo $(am__objects_2)
+ $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo sigio.lo \
+ vidmem.lo $(am__objects_2)
am__objects_3 = solaris-@SOLARIS_INOUT_ARCH@.lo
nodist_libsolaris_la_OBJECTS = $(am__objects_3)
libsolaris_la_OBJECTS = $(am_libsolaris_la_OBJECTS) \
@@ -119,6 +124,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -139,9 +145,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -170,7 +179,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -179,9 +190,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -220,12 +235,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -245,7 +261,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -255,6 +270,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -268,11 +284,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -308,6 +323,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -332,7 +348,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -355,6 +370,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -386,34 +402,31 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-@SOLARIS_USL_CONSOLE_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
-@SOLARIS_USL_CONSOLE_TRUE@VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c
-
-# TODO: Don't build agpgart on SPARC
-#if defined(i386Architecture) || defined(AMD64Architecture)
-AGP_SRC = sun_agp.c
-#else
-#AGP_SRC = $(srcdir)/../shared/agp_noop.c
-#endif
+@SOLARIS_VT_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+@SOLARIS_VT_TRUE@VTSW_SRC = sun_VTsw.c
+@AGP_FALSE@AGP_SRC = $(srcdir)/../shared/agp_noop.c
+@AGP_TRUE@AGP_SRC = sun_agp.c
SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S
DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il
noinst_LTLIBRARIES = libsolaris.la
libsolaris_la_SOURCES = sun_init.c \
sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
$(srcdir)/../shared/kmod_noop.c \
- $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \
- $(srcdir)/../shared/stdResource.c \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/sigio.c \
$(srcdir)/../shared/vidmem.c \
$(VTSW_SRC)
nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
-sdk_HEADERS = agpgart.h
+sdk_HEADERS =
nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
INCLUDES = $(XORG_INCS)
@@ -473,12 +486,12 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_usl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_VTsw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_agp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_apm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bell.Plo@am__quote@
@@ -528,6 +541,13 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+agp_noop.lo: $(srcdir)/../shared/agp_noop.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c
+
kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo
@@ -542,19 +562,12 @@ posix_tty.lo: $(srcdir)/../shared/posix_tty.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c
-sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigiostubs.Tpo $(DEPDIR)/sigiostubs.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigiostubs.c' object='sigiostubs.lo' libtool=yes @AMDEPBACKSLASH@
+sigio.lo: $(srcdir)/../shared/sigio.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c
-
-stdResource.lo: $(srcdir)/../shared/stdResource.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c
vidmem.lo: $(srcdir)/../shared/vidmem.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c
@@ -570,13 +583,6 @@ VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c
-VTsw_usl.lo: $(srcdir)/../shared/VTsw_usl.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_usl.lo -MD -MP -MF $(DEPDIR)/VTsw_usl.Tpo -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/VTsw_usl.Tpo $(DEPDIR)/VTsw_usl.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/VTsw_usl.c' object='VTsw_usl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c
-
mostlyclean-libtool:
-rm -f *.lo
@@ -828,7 +834,7 @@ uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS
solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S
- $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@
+ $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S
index 9f5e58cb0..4a0e0f48a 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S
+++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S
@@ -32,7 +32,7 @@
#define _ASM
#include <sys/asm_linkage.h>
#define FUNCTION_START(f,n) ENTRY(f)
-#define FUNCTION_END(f) SET_SIZE(f)
+#define FUNCTION_END(f) ret; SET_SIZE(f)
#endif
FUNCTION_START(inb,4)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S
index e2d9cf60a..280154bab 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S
+++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S
@@ -32,7 +32,7 @@
#define _ASM
#include <sys/asm_linkage.h>
#define FUNCTION_START(f,n) ENTRY(f)
-#define FUNCTION_END(f) SET_SIZE(f)
+#define FUNCTION_END(f) ret; SET_SIZE(f)
#endif
FUNCTION_START(inb,4)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S
index fb23942ef..dbaa0308b 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S
+++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S
@@ -33,7 +33,7 @@
#define _ASM
#include <sys/asm_linkage.h>
#define FUNCTION_START(f,n) ENTRY(f)
-#define FUNCTION_END(f) SET_SIZE(f)
+#define FUNCTION_END(f) retl; nop; SET_SIZE(f)
#endif
/* Converted from common/compiler.h gcc inline format to Sun cc inline
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c
new file mode 100644
index 000000000..0dc76b8b5
--- /dev/null
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include <door.h>
+#include <sys/vtdaemon.h>
+
+/*
+ * Handle the VT-switching interface for Solaris/OpenSolaris
+ */
+
+void
+xf86VTRequest(int sig)
+{
+ if (xf86Info.vtPendingNum != -1)
+ {
+ ioctl(xf86Info.consoleFd, VT_RELDISP, 1);
+ xf86Info.vtPendingNum = -1;
+
+ return;
+ }
+
+ xf86Info.vtRequestsPending = TRUE;
+ return;
+}
+
+Bool
+xf86VTSwitchPending(void)
+{
+ return(xf86Info.vtRequestsPending ? TRUE : FALSE);
+}
+
+Bool
+xf86VTSwitchAway(void)
+{
+ int door_fd;
+ vt_cmd_arg_t vt_door_arg;
+ door_arg_t door_arg;
+
+ xf86Info.vtRequestsPending = FALSE;
+
+ vt_door_arg.vt_ev = VT_EV_HOTKEYS;
+ vt_door_arg.vt_num = xf86Info.vtPendingNum;
+ door_arg.data_ptr = (char *)&vt_door_arg;
+ door_arg.data_size = sizeof (vt_cmd_arg_t);
+ door_arg.rbuf = NULL;
+ door_arg.rsize = 0;
+ door_arg.desc_ptr = NULL;
+ door_arg.desc_num = 0;
+
+ if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0)
+ return (FALSE);
+
+ if (door_call(door_fd, &door_arg) != 0) {
+ close(door_fd);
+ return (FALSE);
+ }
+
+ close(door_fd);
+ return (TRUE);
+}
+
+Bool
+xf86VTSwitchTo(void)
+{
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ {
+ return(FALSE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+}
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
index e97ab9ef9..376f98edd 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
@@ -34,8 +34,6 @@
* of the copyright holder.
*/
-#pragma ident "@(#)sun_agp.c 1.1 05/04/04 SMI"
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -49,11 +47,8 @@
#include <sys/ioccom.h>
#include <sys/types.h>
#include <fcntl.h>
-#include "agpgart.h"
+#include <sys/agpgart.h>
-#ifndef AGP_DEVICE
-#define AGP_DEVICE "/dev/agpgart"
-#endif
/* AGP page size is independent of the host page size. */
#ifndef AGP_PAGE_SIZE
#define AGP_PAGE_SIZE 4096
@@ -66,7 +61,7 @@ static Bool initDone = FALSE;
* Close /dev/agpgart. This frees all associated memory allocated during
* this server generation.
*/
-_X_EXPORT Bool
+Bool
xf86GARTCloseScreen(int screenNum)
{
if (gartFd != -1) {
@@ -110,14 +105,14 @@ GARTInit(int screenNum)
return TRUE;
}
-_X_EXPORT Bool
+Bool
xf86AgpGARTSupported(void)
{
return (GARTInit(-1));
}
-_X_EXPORT AgpInfoPtr
+AgpInfoPtr
xf86GetAGPInfo(int screenNum)
{
agp_info_t agpinf;
@@ -150,7 +145,7 @@ xf86GetAGPInfo(int screenNum)
return info;
}
-_X_EXPORT Bool
+Bool
xf86AcquireGART(int screenNum)
{
@@ -171,7 +166,7 @@ xf86AcquireGART(int screenNum)
return TRUE;
}
-_X_EXPORT Bool
+Bool
xf86ReleaseGART(int screenNum)
{
@@ -200,7 +195,7 @@ xf86ReleaseGART(int screenNum)
return FALSE;
}
-_X_EXPORT int
+int
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
unsigned long *physical)
{
@@ -238,7 +233,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
return alloc.agpa_key;
}
-_X_EXPORT Bool
+Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
@@ -255,7 +250,7 @@ xf86DeallocateGARTMemory(int screenNum, int key)
}
/* Bind GART memory with "key" at "offset" */
-_X_EXPORT Bool
+Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
{
agp_bind_t bind;
@@ -291,7 +286,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
}
/* Unbind GART memory with "key" */
-_X_EXPORT Bool
+Bool
xf86UnbindGARTMemory(int screenNum, int key)
{
agp_unbind_t unbind;
@@ -317,7 +312,7 @@ xf86UnbindGARTMemory(int screenNum, int key)
/* XXX Interface may change. */
-_X_EXPORT Bool
+Bool
xf86EnableAGP(int screenNum, CARD32 mode)
{
agp_setup_t setup;
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
index 7decc900f..e128c13d0 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
@@ -215,7 +215,7 @@ xf86OSPMOpen(void)
}
xf86PMGetEventFromOs = sunPMGetEventFromOS;
xf86PMConfirmEventToOs = sunPMConfirmEventToOs;
- APMihPtr = xf86AddInputHandler(fd, xf86HandlePMEvents, NULL);
+ APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
return sunCloseAPM;
}
@@ -225,7 +225,7 @@ sunCloseAPM(void)
int fd;
if (APMihPtr) {
- fd = xf86RemoveInputHandler(APMihPtr);
+ fd = xf86RemoveGeneralHandler(APMihPtr);
close(fd);
APMihPtr = NULL;
}
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c
index 29ecd7300..b25f40d8e 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c
@@ -48,7 +48,7 @@
#define AUDIO_DEVICE "/dev/audio"
-_X_EXPORT void
+void
xf86OSRingBell(int loudness, int pitch, int duration)
{
static short samples[BELL_SAMPLES];
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
index 795b0c13c..2c569f02c 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
@@ -38,13 +38,15 @@ static Bool Protect0 = FALSE;
#ifdef HAS_USL_VTS
static int VTnum = -1;
static int xf86StartVT = -1;
+static int vtEnabled = 0;
#endif
-#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
-static char fb_dev[PATH_MAX] = "/dev/fb";
-#else
-static char fb_dev[PATH_MAX] = "/dev/console";
-#endif
+/* Device to open as xf86Info.consoleFd */
+static char consoleDev[PATH_MAX] = "/dev/fb";
+
+/* Set by -dev argument on CLI
+ Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
+_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
void
xf86OpenConsole(void)
@@ -93,86 +95,101 @@ xf86OpenConsole(void)
/*
* Setup the virtual terminal manager
*/
- if (VTnum != -1)
+ if ((fd = open("/dev/vt/0",O_RDWR,0)) == -1)
{
- xf86Info.vtno = VTnum;
- from = X_CMDLINE;
+ xf86ErrorF("xf86OpenConsole: Cannot open /dev/vt/0 (%s)\n",
+ strerror(errno));
+ vtEnabled = 0;
}
else
{
- if ((fd = open("/dev/vt00",O_RDWR,0)) < 0)
- FatalError("xf86OpenConsole: Cannot open /dev/vt00 (%s)\n",
- strerror(errno));
+ if (ioctl(fd, VT_ENABLED, &vtEnabled) < 0)
+ {
+ xf86ErrorF("xf86OpenConsole: VT_ENABLED failed (%s)\n",
+ strerror(errno));
+ vtEnabled = 0;
+ }
+ }
+
+ if (vtEnabled == 0)
+ {
+ /* VT not enabled - kernel too old or Sparc platforms
+ without visual_io support */
+ xf86Msg(from, "VT infrastructure is not available\n");
+
+ xf86StartVT = 0;
+ xf86Info.vtno = 0;
+ strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev));
+ }
+ else
+ {
if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0)
FatalError("xf86OpenConsole: Cannot determine current VT\n");
xf86StartVT = vtinfo.v_active;
- /*
- * There is a SEVERE problem with x86's VT's. The VT_OPENQRY
- * ioctl() will panic the entire system if all 8 (7 VT's+Console)
- * terminals are used. The only other way I've found to determine
- * if there is a free VT is to try activating all the the available
- * VT's and see if they all succeed - if they do, there there is no
- * free VT, and the Xserver cannot continue without panic'ing the
- * system. (It's ugly, but it seems to work.) Note there is a
- * possible race condition here.
- *
- * David Holland 2/23/94
- */
-
- FreeVTslot = 0;
- for (i = 7; (i >= 0) && !FreeVTslot; i--)
- if (ioctl(fd, VT_ACTIVATE, i) != 0)
- FreeVTslot = 1;
+ if (VTnum != -1)
+ {
+ xf86Info.vtno = VTnum;
+ from = X_CMDLINE;
+ }
+ else
+ {
+ if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
+ (xf86Info.vtno == -1)) {
+ FatalError("xf86OpenConsole: Cannot find a free VT\n");
+ }
+ }
- if (!FreeVTslot ||
- (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
- (xf86Info.vtno == -1))
- FatalError("xf86OpenConsole: Cannot find a free VT\n");
+ xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
+ snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
+ }
+ if (fd != -1) {
close(fd);
}
- xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
-
- sprintf(fb_dev, "/dev/vt%02d", xf86Info.vtno); /* Solaris 2.1 x86 */
-
#endif /* HAS_USL_VTS */
if (!KeepTty)
setpgrp();
- if (((xf86Info.consoleFd = open(fb_dev, O_RDWR | O_NDELAY, 0)) < 0))
+ if (((xf86Info.consoleFd = open(consoleDev, O_RDWR | O_NDELAY, 0)) < 0))
FatalError("xf86OpenConsole: Cannot open %s (%s)\n",
- fb_dev, strerror(errno));
+ consoleDev, strerror(errno));
#ifdef HAS_USL_VTS
/* Change ownership of the vt */
- chown(fb_dev, getuid(), getgid());
+ chown(consoleDev, getuid(), getgid());
- /*
- * Now get the VT
- */
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
+ if (vtEnabled)
+ {
+ /*
+ * Now get the VT
+ */
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
+
+ if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
+ if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
+ FatalError("xf86OpenConsole: VT_GETMODE failed\n");
- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
- FatalError("xf86OpenConsole: VT_GETMODE failed\n");
+ OsSignal(SIGUSR1, xf86VTRequest);
- signal(SIGUSR1, xf86VTRequest);
+ VT.mode = VT_PROCESS;
+ VT.relsig = SIGUSR1;
+ VT.acqsig = SIGUSR1;
- VT.mode = VT_PROCESS;
- VT.relsig = SIGUSR1;
- VT.acqsig = SIGUSR1;
+ if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
+ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
+ if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0)
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n");
+ }
#endif
#ifdef KDSETMODE
@@ -180,30 +197,31 @@ xf86OpenConsole(void)
if (i < 0) {
xf86Msg(X_WARNING,
"xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n",
- fb_dev, strerror(errno));
+ consoleDev, strerror(errno));
}
#endif
}
else /* serverGeneration != 1 */
{
#ifdef HAS_USL_VTS
- /*
- * Now re-get the VT
- */
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
-
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
+ if (vtEnabled) {
+ /*
+ * Now re-get the VT
+ */
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
- /*
- * If the server doesn't have the VT when the reset occurs,
- * this is to make sure we don't continue until the activate
- * signal is received.
- */
- if (!xf86Screens[0]->vtSema)
- sleep(5);
+ if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
+ /*
+ * If the server doesn't have the VT when the reset occurs,
+ * this is to make sure we don't continue until the activate
+ * signal is received.
+ */
+ if (!xf86Screens[0]->vtSema)
+ sleep(5);
+ }
#endif /* HAS_USL_VTS */
}
@@ -218,7 +236,7 @@ xf86CloseConsole(void)
#if !defined(__i386__) && !defined(__i386) && !defined(__x86)
- if (!xf86DoProbe && !xf86DoConfigure) {
+ if (!xf86DoConfigure) {
int fd;
/*
@@ -228,7 +246,7 @@ xf86CloseConsole(void)
* at this point whether this should be done for all framebuffers in
* the system, rather than only the console.
*/
- if ((fd = open("/dev/fb", O_RDWR, 0)) < 0) {
+ if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) {
xf86Msg(X_WARNING,
"xf86CloseConsole(): unable to open framebuffer (%s)\n",
strerror(errno));
@@ -267,30 +285,16 @@ xf86CloseConsole(void)
#endif
#ifdef HAS_USL_VTS
+ if (vtEnabled == 1) {
+ if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
+ {
+ VT.mode = VT_AUTO; /* Set default vt handling */
+ ioctl(xf86Info.consoleFd, VT_SETMODE, &VT);
+ }
- /*
- * Solaris 2.1 x86 doesn't seem to "switch" back to the console when the VT
- * is relinquished and its mode is reset to auto. Also, Solaris 2.1 seems
- * to associate vt00 with the console so I've opened the "console" back up
- * and made it the active vt again in text mode and then closed it. There
- * must be a better hack for this but I'm not aware of one at this time.
- *
- * Doug Anson 11/6/93
- * danson@lgc.com
- *
- * Fixed - 12/5/93 - David Holland - davidh@dorite.use.com
- * Did the whole thing similarly to the way linux does it
- */
-
- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
- {
- VT.mode = VT_AUTO; /* Set default vt handling */
- ioctl(xf86Info.consoleFd, VT_SETMODE, &VT);
+ /* Activate the VT that X was started on */
+ ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT);
}
-
- /* Activate the VT that X was started on */
- ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT);
-
#endif /* HAS_USL_VTS */
close(xf86Info.consoleFd);
@@ -323,7 +327,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
- if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
+ if (sscanf(argv[i], "vt%d", &VTnum) == 0)
{
UseMsg();
VTnum = -1;
@@ -337,8 +341,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
if ((i + 1) < argc) {
if (!strcmp(argv[i], "-dev")) {
- strncpy(fb_dev, argv[i+1], PATH_MAX);
- fb_dev[PATH_MAX - 1] = '\0';
+ strlcpy(xf86SolarisFbDev, argv[i+1], sizeof(xf86SolarisFbDev));
return 2;
}
}
@@ -349,7 +352,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
void xf86UseMsg()
{
#ifdef HAS_USL_VTS
- ErrorF("vtXX Use the specified VT number\n");
+ ErrorF("vtX Use the specified VT number\n");
#endif
ErrorF("-dev <fb> Framebuffer device\n");
ErrorF("-keeptty Don't detach controlling tty\n");
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
index 3982f631f..2078646b1 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
@@ -186,7 +186,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/*
* Read BIOS via mmap()ing physical memory.
*/
-_X_EXPORT int
+int
xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
int Len)
{
@@ -235,7 +235,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
static Bool ExtendedEnabled = FALSE;
#endif
-_X_EXPORT Bool
+Bool
xf86EnableIO(void)
{
#if defined(__i386__) || defined(__i386) || defined(__x86)
@@ -251,7 +251,7 @@ xf86EnableIO(void)
return TRUE;
}
-_X_EXPORT void
+void
xf86DisableIO(void)
{
#if defined(__i386__) || defined(__i386) || defined(__x86)