summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/dixmods/GLcoremodule.c4
-rw-r--r--hw/xfree86/doc/README.fonts82
-rw-r--r--hw/xfree86/dri/drimodule.c5
-rw-r--r--hw/xfree86/loader/dixsym.c110
-rw-r--r--hw/xfree86/loader/extsym.c3
-rw-r--r--hw/xfree86/os-support/README.OS-lib2
-rw-r--r--hw/xfree86/os-support/bsd/alpha_video.c34
-rw-r--r--hw/xfree86/os-support/bsd/arm_video.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsdResource.c4
-rw-r--r--hw/xfree86/os-support/bsd/bsd_KbdMap.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_VTsw.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_apm.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_axp.c6
-rw-r--r--hw/xfree86/os-support/bsd/bsd_ev56.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_init.c40
-rw-r--r--hw/xfree86/os-support/bsd/bsd_io.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_jstk.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kbd.c8
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kbd.h2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kmod.c2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/data.c2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/descr.c2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/parse.c2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/usage.c2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/usb.32
-rw-r--r--hw/xfree86/os-support/bsd/libusb/usb.h2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/usb_hid_usages2
-rw-r--r--hw/xfree86/os-support/bsd/libusb/usbvar.h2
-rw-r--r--hw/xfree86/os-support/bsd/memrange.h2
-rw-r--r--hw/xfree86/os-support/bsd/ppc_video.c6
-rw-r--r--hw/xfree86/os-support/bsd/sparc64_video.c4
-rw-r--r--hw/xfree86/os-support/bus/460gxPCI.c42
-rw-r--r--hw/xfree86/os-support/bus/460gxPCI.h4
-rw-r--r--hw/xfree86/os-support/bus/Sbus.c4
-rw-r--r--hw/xfree86/os-support/bus/axpPci.c2
-rw-r--r--hw/xfree86/os-support/bus/e8870PCI.c14
-rw-r--r--hw/xfree86/os-support/bus/e8870PCI.h4
-rw-r--r--hw/xfree86/os-support/bus/freebsdPci.c4
-rw-r--r--hw/xfree86/os-support/bus/ppcPci.c2
-rw-r--r--hw/xfree86/os-support/bus/xf86Sbus.h8
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.c16
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.h2
-rw-r--r--hw/xfree86/os-support/drm/drmmodule.c4
-rw-r--r--hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c4
-rw-r--r--hw/xfree86/os-support/linux/lnx.h2
-rw-r--r--hw/xfree86/os-support/linux/lnxResource.c13
-rw-r--r--hw/xfree86/os-support/linux/lnx_KbdMap.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_agp.c10
-rw-r--r--hw/xfree86/os-support/linux/lnx_apm.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_axp.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_ev56.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c78
-rw-r--r--hw/xfree86/os-support/linux/lnx_io.c16
-rw-r--r--hw/xfree86/os-support/linux/lnx_jstk.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_kbd.c17
-rw-r--r--hw/xfree86/os-support/linux/lnx_kbd.h2
-rw-r--r--hw/xfree86/os-support/linux/lnx_kmod.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_mouse.c175
-rw-r--r--hw/xfree86/os-support/linux/lnx_pci.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_init.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_io.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_mmap.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_noinline.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_ppc.c2
-rw-r--r--hw/xfree86/os-support/lynxos/lynx_video.c2
-rw-r--r--hw/xfree86/os-support/misc/BUSmemcpy.S2
-rw-r--r--hw/xfree86/os-support/misc/BUSmemcpy.c2
-rw-r--r--hw/xfree86/os-support/misc/Delay.c2
-rw-r--r--hw/xfree86/os-support/misc/IODelay.S2
-rw-r--r--hw/xfree86/os-support/misc/IODelay.c2
-rw-r--r--hw/xfree86/os-support/misc/SlowBcopy.S2
-rw-r--r--hw/xfree86/os-support/misc/SlowBcopy.c10
-rw-r--r--hw/xfree86/os-support/misc/xf86_IlHack.c2
-rw-r--r--hw/xfree86/os-support/misc/xf86_Util.c2
-rw-r--r--hw/xfree86/os-support/sco/VTsw_sco.c2
-rw-r--r--hw/xfree86/os-support/sco/sco_init.c2
-rw-r--r--hw/xfree86/os-support/sco/sco_io.c2
-rw-r--r--hw/xfree86/os-support/sco/sco_iop.c2
-rw-r--r--hw/xfree86/os-support/sco/sco_mouse.c2
-rw-r--r--hw/xfree86/os-support/sco/sco_video.c2
-rw-r--r--hw/xfree86/os-support/shared/VTsw_noop.c2
-rw-r--r--hw/xfree86/os-support/shared/VTsw_usl.c2
-rw-r--r--hw/xfree86/os-support/shared/bios_devmem.c2
-rw-r--r--hw/xfree86/os-support/shared/bios_mmap.c2
-rw-r--r--hw/xfree86/os-support/shared/inout.S2
-rw-r--r--hw/xfree86/os-support/shared/ioperm_noop.c2
-rw-r--r--hw/xfree86/os-support/shared/std_kbdEv.c2
-rw-r--r--hw/xfree86/os-support/shared/sysv_kbd.c2
-rw-r--r--hw/xfree86/os-support/shared/xf86Axp.h2
-rw-r--r--hw/xfree86/os-support/solaris/sun_bios.c6
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c21
-rw-r--r--hw/xfree86/os-support/solaris/sun_inout.s2
-rw-r--r--hw/xfree86/os-support/solaris/sun_io.c2
-rw-r--r--hw/xfree86/os-support/solaris/sun_kbd.c25
-rw-r--r--hw/xfree86/os-support/solaris/sun_mouse.c243
-rw-r--r--hw/xfree86/os-support/solaris/sun_vid.c2
-rw-r--r--hw/xfree86/os-support/sysv/sysv_init.c2
-rw-r--r--hw/xfree86/os-support/sysv/sysv_io.c2
-rw-r--r--hw/xfree86/os-support/sysv/sysv_video.c2
-rw-r--r--hw/xfree86/os-support/sysv/xqueue.c2
-rw-r--r--hw/xfree86/os-support/sysv/xqueue.h2
-rw-r--r--hw/xfree86/os-support/xf86OSKbd.h4
-rw-r--r--hw/xfree86/os-support/xf86_OSproc.h1
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h4
-rw-r--r--hw/xfree86/os-support/xf86_libc.h17
105 files changed, 788 insertions, 398 deletions
diff --git a/hw/xfree86/dixmods/GLcoremodule.c b/hw/xfree86/dixmods/GLcoremodule.c
index 9369db1f2..a62b33ce4 100644
--- a/hw/xfree86/dixmods/GLcoremodule.c
+++ b/hw/xfree86/dixmods/GLcoremodule.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c,v 1.1 2002/02/25 00:45:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -42,7 +42,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/doc/README.fonts b/hw/xfree86/doc/README.fonts
index 33c082b90..8818b293e 100644
--- a/hw/xfree86/doc/README.fonts
+++ b/hw/xfree86/doc/README.fonts
@@ -1,4 +1,4 @@
- Fonts in X11R6.8
+ Fonts in X11R6.8.1
Juliusz Chroboczek, <jch@pps.jussieu.fr>
@@ -6,9 +6,9 @@
1. Introduction
-This document describes the support for fonts in X11R6.8. Installing fonts
+This document describes the support for fonts in X11R6.8.1. Installing fonts
(section 2., page 1) is aimed at the casual user wishing to install fonts in
-X11R6.8 the rest of the document describes the font support in more detail.
+X11R6.8.1 the rest of the document describes the font support in more detail.
We assume some familiarity with digital fonts. If anything is not clear to
you, please consult Appendix: Background (section 5., page 1) at the end of
@@ -18,8 +18,8 @@ this document for background information.
X includes two font systems: the original core X11 fonts system, which is
present in all implementations of X11, and the Xft fonts system, which may
-not be distributed with implementations of X11 that are not based on X11R6.8
-but will hopefully be included by them in the future
+not be distributed with implementations of X11 that are not based on
+X11R6.8.1 but will hopefully be included by them in the future
The core X11 fonts system is directly derived from the fonts system included
with X11R1 in 1987, which could only use monochrome bitmap fonts. Over the
@@ -48,16 +48,17 @@ access newly-installed fonts.
Xft has no configuration mechanism itself, rather it relies upon the fontcon-
fig library to configure and customize fonts. That library is not specific
-to X11R6.8 or indeed on any particular font output mechanism. This discus-
+to X11R6.8.1 or indeed on any particular font output mechanism. This discus-
sion describes how fontconfig, rather than Xft, works.
2.1.1 Installing fonts in Xft
Fontconfig looks for fonts in a set of well-known directories that include
-all of X11R6.8's standard font directories (`/usr/X11R6/lib/X11/lib/fonts/*')
-by default) as well as a directory called `.fonts/' in the user's home direc-
-tory. Installing a font for use by Xft applications is as simple as copying
-a font file into one of these directories.
+all of X11R6.8.1's standard font directories
+(`/usr/X11R6/lib/X11/lib/fonts/*') by default) as well as a directory called
+`.fonts/' in the user's home directory. Installing a font for use by Xft
+applications is as simple as copying a font file into one of these directo-
+ries.
$ cp lucbr.ttf ~/.fonts/
@@ -114,7 +115,7 @@ Anti-aliasing can be disabled for all fonts by the following incantation:
</edit>
</match>
-Xft supports sub-pixel rasterisation on LCD displays. X11R6.8 should auto-
+Xft supports sub-pixel rasterisation on LCD displays. X11R6.8.1 should auto-
matically enable this feature on laptops and when using an LCD monitor con-
nected with a DVI cable; you can check whether this was done by typing
@@ -185,9 +186,9 @@ of this new directory by including it in the font path.
2.2.1 Installing bitmap fonts
-The X11R6.8 server can use bitmap fonts in both the cross-platform BDF format
-and the somewhat more efficient binary PCF format. (X11R6.8 also supports
-the obsolete SNF format.)
+The X11R6.8.1 server can use bitmap fonts in both the cross-platform BDF for-
+mat and the somewhat more efficient binary PCF format. (X11R6.8.1 also sup-
+ports the obsolete SNF format.)
Bitmap fonts are normally distributed in the BDF format. Before installing
such fonts, it is desirable (but not absolutely necessary) to convert the
@@ -215,7 +216,7 @@ directory; see Setting the server font path (section 2.2.4, page 1) below.
2.2.2 Installing scalable fonts
-The X11R6.8 server supports scalable fonts in four formats: Type 1, Speedo,
+The X11R6.8.1 server supports scalable fonts in four formats: Type 1, Speedo,
TrueType and CIDFont. This section only applies to the former three; for
information on CIDFonts, please see Installing CIDFonts (section 2.2.3, page
1) later in this document.
@@ -251,7 +252,7 @@ CMap `UniKS-UCS2-H' is called
Munhwa-Regular--UniKS-UCS2-H
-The CIDFont code in X11R6.8 requires a very rigid directory structure. The
+The CIDFont code in X11R6.8.1 requires a very rigid directory structure. The
main directory must be called `CID' (its location defaults to
`/usr/X11R6/lib/X11/fonts/CID' but it may be located anywhere), and it should
contain a subdirectory for every CID collection. Every subdirectory must
@@ -310,7 +311,7 @@ For best results, scalable fonts should appear in the font path before the
bitmap fonts; this way, the server will prefer bitmap fonts to scalable fonts
when an exact match is possible, but will avoid scaling bitmap fonts when a
scalable font can be used. (The `:unscaled' hack, while still supported,
-should no longer be necessary in X11R6.8.)
+should no longer be necessary in X11R6.8.1.)
You may check the font path of the running server by typing the command
@@ -353,11 +354,11 @@ mounted font directories). If this doesn't help, it is quite possible that
you are trying to use a font in a format that is not supported by your
server.
-X11R6.8 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
-CIDFont font formats. However, not all X11R6.8 servers come with all the
+X11R6.8.1 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
+CIDFont font formats. However, not all X11R6.8.1 servers come with all the
font backends configured in.
-On most platforms, the X11R6.8 servers are modular: the font backends are
+On most platforms, the X11R6.8.1 servers are modular: the font backends are
included in modules that are loaded at runtime. The modules to be loaded are
specified in the `xorg.conf' file using the `Load' directive:
@@ -365,7 +366,7 @@ specified in the `xorg.conf' file using the `Load' directive:
If you have trouble installing fonts in a specific format, you may want to
check the server's log file in order to see whether the relevant modules are
-properly loaded. The list of font modules distributed with X11R6.8 is as
+properly loaded. The list of font modules distributed with X11R6.8.1 is as
follows:
o "bitmap": bitmap fonts (`*.bdf', `*.pcf' and `*.snf');
@@ -382,7 +383,7 @@ follows:
Please note that the argument of the `Load' directive is case-sensitive.
-3. Fonts included with X11R6.8
+3. Fonts included with X11R6.8.1
3.1 Standard bitmap fonts
@@ -391,7 +392,7 @@ fonts, including the `fixed' family, and bitmap versions of Courier, Times,
Helvetica and some members of the Lucida family. In the SI, these fonts are
provided in the ISO 8859-1 encoding (ISO Latin Western-European).
-In X11R6.8, a number of these fonts are provided in Unicode-encoded font
+In X11R6.8.1, a number of these fonts are provided in Unicode-encoded font
files instead. At build time, these fonts are split into font files encoded
according to legacy encodings, a process which allows us to provide the stan-
dard fonts in a number of regional encodings with no duplication of work.
@@ -469,7 +470,7 @@ for improved presentation of text.
3.3 Standard scalable fonts
-X11R6.8 includes all the scalable fonts distributed with X11R6.
+X11R6.8.1 includes all the scalable fonts distributed with X11R6.
3.3.1 Standard Type 1 fonts
@@ -491,7 +492,7 @@ and reside in the font files
/usr/X11R6/lib/X11/fonts/Type1/UT*.pfa
-Finally, X11R6.8 also comes with Type 1 versions of Bitstream Courier and
+Finally, X11R6.8.1 also comes with Type 1 versions of Bitstream Courier and
Charter. These fonts have XLFD
-bitstream-courier-*-*-normal--0-0-0-0-m-0-iso8859-1
@@ -503,9 +504,10 @@ and reside in the font files
3.3.2 Standard Speedo fonts
-X11R6.8 includes Speedo versions of the Bitstream Courier and Charter fonts.
-In order to use these fonts, you should ensure that your X server is loading
-the `Speedo' font backend; see Troubleshooting (section 2.2.5, page 1).
+X11R6.8.1 includes Speedo versions of the Bitstream Courier and Charter
+fonts. In order to use these fonts, you should ensure that your X server is
+loading the `Speedo' font backend; see Troubleshooting (section 2.2.5, page
+1).
These fonts cover all of ISO 8859-1 and almost all of ISO 8859-2. They have
XLFD name
@@ -519,7 +521,7 @@ and reside in the font files
3.4 The Bigelow & Holmes Luxi family
-X11R6.8 includes the Luxi family of scalable fonts, in both TrueType and
+X11R6.8.1 includes the Luxi family of scalable fonts, in both TrueType and
Type 1 format. This family consists of the fonts Luxi Serif, with XLFD
-b&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-*
@@ -565,11 +567,11 @@ For more information, please contact <design@bigelowandholmes.com> or
An earlier version of the Luxi fonts was made available under the name
Lucidux. This name should no longer be used due to trademark uncertainties,
-and all traces of the Lucidux name have been removed from X11R6.8.
+and all traces of the Lucidux name have been removed from X11R6.8.1.
4. More about core fonts
-This section describes X11R6.8-specific enhancements to the core X11 fonts
+This section describes X11R6.8.1-specific enhancements to the core X11 fonts
system.
4.1 Core fonts and internationalisation
@@ -592,8 +594,8 @@ backend) use a common fontenc layer for font re-encoding. This allows these
backends to share their encoding data, and allows simple configuration of new
locales independently of font type.
-Please note: the X-TrueType (X-TT) backend is not included in X11R6.8. That
-functionality has been merged into the FreeType backend.>
+Please note: the X-TrueType (X-TT) backend is not included in X11R6.8.1.
+That functionality has been merged into the FreeType backend.>
In the fontenc layer, an encoding is defined by a name (such as iso8859-1),
possibly a number of aliases (alternate names), and an ordered collection of
@@ -652,7 +654,7 @@ option followed by the name of a directory containing encoding files, can be
used to automatically build `encodings.dir' files. Please see the mkfont-
dir(1) manual page for more details.
-A number of encoding files for common encodings are included with X11R6.8.
+A number of encoding files for common encodings are included with X11R6.8.1.
Information on writing new encoding files can be found in Format of encodings
directory files (section 4.1.3, page 1) and Format of encoding files (section
4.1.4, page 1) later in this document.
@@ -988,7 +990,7 @@ ings, but instead uses its own database of encodings.
Since the functionalities for CJKV support introduced by X-TT have been
merged into the new FreeType backend, the X-TT backend will be removed from
-X11R6.8's tree near the future. Therefore, the use of FreeType backend is
+X11R6.8.1's tree near the future. Therefore, the use of FreeType backend is
preferred over the X-TT backend.
General information on X-TrueType may be found at the After X-TT Project page
@@ -1135,16 +1137,16 @@ last two fields of their XLFD set to `iso10646-1'.
6. References
-X11R6.8 comes with extensive documentation in the form of manual pages and
+X11R6.8.1 comes with extensive documentation in the form of manual pages and
typeset documents. Before installing fonts, you really should read the font-
config(3) and mkfontdir(1) manual pages; other manual pages of interest
include X(7), Xserver(1), xset(1), Xft(3), xlsfonts(1) and showfont(1). In
addition, you may want to read the X Logical Font Description document, by
Jim Flowers, which is provided in the file `xc/doc/xlfd.PS.Z'.
-The latest released version of the X11R6.8 documentation (including this doc-
-ument and all manual pages) can be found from current X11R6.8 documentation
-<URL:http://wiki.x.org/>.
+The latest released version of the X11R6.8.1 documentation (including this
+document and all manual pages) can be found from current X11R6.8.1 documenta-
+tion <URL:http://wiki.x.org/>.
The comp.fonts FAQ <URL:http://www.netmeg.net/faq/computers/fonts/>, which is
unfortunately no longer being maintained, contains a wealth of information
@@ -1179,4 +1181,4 @@ world, often provide interesting information about character set issues; see
for example RFC 373.
-$XdotOrg$
+$XdotOrg: $
diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c
index bb7a89ee0..9410a3200 100644
--- a/hw/xfree86/dri/drimodule.c
+++ b/hw/xfree86/dri/drimodule.c
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
/**************************************************************************
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -24,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.6 2001/12/10 19:07:19 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.5 2001/06/15 21:22:39 dawes Exp $ */
/*
* Authors:
@@ -43,7 +44,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 321be9e04..e0b93926f 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.6 2004/09/14 00:51:24 gisburn Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.4 2004/08/09 03:40:50 krh Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
* 17:11:29 tsi Exp $ */
@@ -325,122 +325,15 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(AdjustWaitForDelay)
SYMVAR(noTestExtensions)
SYMFUNC(GiveUp)
-
-#ifdef BEZIER
- SYMVAR(noBezierExtension)
-#endif
-#ifdef BIGREQS
- SYMVAR(noBigReqExtension)
-#endif
#ifdef COMPOSITE
SYMVAR(noCompositeExtension)
#endif
-#ifdef DAMAGE
- SYMVAR(noDamageExtension)
-#endif
-#ifdef DBE
- SYMVAR(noDbeExtension)
-#endif
-#ifdef DPSEXT
- SYMVAR(noDPSExtension)
-#endif
-#ifdef DPMSExtension
- SYMVAR(noDPMSExtension)
-#endif
-#ifdef EVI
- SYMVAR(noEVIExtension)
-#endif
-#ifdef FONTCACHE
- SYMVAR(noFontCacheExtension)
-#endif
-#ifdef GLXEXT
- SYMVAR(noGlxExtension)
-#endif
-#ifdef LBX
- SYMVAR(noLbxExtension)
-#endif
-#ifdef SCREENSAVER
- SYMVAR(noScreenSaverExtension)
-#endif
-#ifdef MITSHM
- SYMVAR(noMITShmExtension)
-#endif
-#ifdef MITMISC
- SYMVAR(noMITMiscExtension)
-#endif
-#ifdef MULTIBUFFER
- SYMVAR(noMultibufferExtension)
-#endif
-#ifdef RANDR
- SYMVAR(noRRExtension)
-#endif
#ifdef RENDER
SYMVAR(noRenderExtension)
#endif
-#ifdef SHAPE
- SYMVAR(noShapeExtension)
-#endif
-#ifdef XCSECURITY
- SYMVAR(noSecurityExtension)
-#endif
-#ifdef XSYNC
- SYMVAR(noSyncExtension)
-#endif
-#ifdef TOGCUP
- SYMVAR(noXcupExtension)
-#endif
-#ifdef PEXEXT
- SYMVAR(noPexExtension)
-#endif
-#ifdef RES
- SYMVAR(noResExtension)
-#endif
-#ifdef XAPPGROUP
- SYMVAR(noXagExtension)
-#endif
-#ifdef XCMISC
- SYMVAR(noXCMiscExtension)
-#endif
#ifdef XEVIE
SYMVAR(noXevieExtension)
#endif
-#ifdef XIE
- SYMVAR(noXie)
-#endif
-#ifdef XF86BIGFONT
- SYMVAR(noXFree86BigfontExtension)
-#endif
-#ifdef XFreeXDGA
- SYMVAR(noXFree86DGAExtension)
-#endif
-#ifdef XF86DRI
- SYMVAR(noXFree86DRIExtension)
-#endif
-#ifdef XF86MISC
- SYMVAR(noXFree86MiscExtension)
-#endif
-#ifdef XF86VIDMODE
- SYMVAR(noXFree86VidModeExtension)
-#endif
-#ifdef XFIXES
- SYMVAR(noXFixesExtension)
-#endif
-#ifdef XKB
-/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
- SYMVAR(noXkbExtension)
-#endif
-#ifdef PANORAMIX
- SYMVAR(noPanoramiXExtension)
-#endif
-#ifdef XINPUT
- SYMVAR(noXInputExtension)
-#endif
-#ifdef XIDLE
- SYMVAR(noXIdleExtension)
-#endif
-#ifdef XV
- SYMVAR(noXvExtension)
-#endif
/* log.c */
SYMFUNC(LogVWrite)
@@ -493,6 +386,7 @@ LOOKUP dixLookupTab[] = {
/* xkb/xkbInit.c */
SYMFUNC(XkbInitKeyboardDeviceStruct)
SYMFUNC(XkbSetRulesDflts)
+ SYMVAR(noXkbExtension)
#endif
#ifdef XINPUT
diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c
index 11fb50472..76682e783 100644
--- a/hw/xfree86/loader/extsym.c
+++ b/hw/xfree86/loader/extsym.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4 2004/08/09 03:40:50 krh Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.3 2004/08/08 17:02:19 krh Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
/*
@@ -66,6 +66,7 @@ LOOKUP extLookupTab[] = {
#ifdef PANORAMIX
SYMFUNC(XineramaRegisterConnectionBlockCallback)
SYMFUNC(XineramaDeleteResource)
+ SYMVAR(noPanoramiXExtension)
SYMVAR(PanoramiXNumScreens)
SYMVAR(panoramiXdataPtr)
SYMVAR(PanoramiXVisualTable)
diff --git a/hw/xfree86/os-support/README.OS-lib b/hw/xfree86/os-support/README.OS-lib
index 27af6b3f2..43312e4e8 100644
--- a/hw/xfree86/os-support/README.OS-lib
+++ b/hw/xfree86/os-support/README.OS-lib
@@ -497,7 +497,7 @@ xf86cos(double x)
-$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.10 2001/12/17 20:00:45 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.9 2001/07/23 13:15:48 dawes Exp $
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index aa3313dc3..bab184e7c 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.5 2003/04/03 16:50:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.6 2003/12/30 15:18:30 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -117,11 +117,13 @@ has_bwx(void)
#endif
}
#else /* __NetBSD__ */
+static unsigned long hae_thresh = (1UL << 24);
+static unsigned long hae_mask = 0xf8000000UL; /* XXX - should use xf86AXP.c */
static struct alpha_bus_window *abw;
static int abw_count = -1;
static void
-init_abw()
+init_abw(void)
{
if (abw_count < 0) {
abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw);
@@ -142,7 +144,7 @@ has_bwx(void)
}
static unsigned long
-dense_base()
+dense_base(void)
{
if (abw_count < 0)
init_abw();
@@ -154,7 +156,7 @@ dense_base()
}
static unsigned long
-memory_base()
+memory_base(void)
{
if (abw_count < 0)
init_abw();
@@ -284,11 +286,13 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
xf86Msg(X_PROBED,"Machine needs sparse mapping\n");
pVidMem->mapMem = mapVidMemSparse;
pVidMem->unmapMem = unmapVidMemSparse;
+#ifndef __NetBSD__
if (axpSystem == -1)
axpSystem = bsdGetAXP();
hae_thresh = xf86AXPParams[axpSystem].hae_thresh;
hae_mask = xf86AXPParams[axpSystem].hae_mask;
sparse_size = xf86AXPParams[axpSystem].size;
+#endif /* __NetBSD__ */
}
pVidMem->initialised = TRUE;
}
@@ -314,7 +318,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
if (base == MAP_FAILED)
{
- FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)\n",
"xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno));
}
@@ -324,7 +328,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
/* else, mmap /dev/vga */
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
{
- FatalError("%s: Address 0x%x outside allowable range\n",
+ FatalError("%s: Address 0x%lx outside allowable range\n",
"xf86MapVidMem", Base);
}
base = mmap(0, Size,
@@ -372,7 +376,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if ((long)ptr == -1)
{
xf86Msg(X_WARNING,
- "xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
+ "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno));
return(-1);
}
@@ -490,6 +494,7 @@ struct parms {
u_int64_t hae;
};
+#ifndef __NetBSD__
static int
sethae(u_int64_t hae)
{
@@ -505,6 +510,7 @@ sethae(u_int64_t hae)
return -1;
#endif
}
+#endif /* __NetBSD__ */
static pointer
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
@@ -553,7 +559,6 @@ readSparse8(pointer Base, register unsigned long Offset)
{
register unsigned long result, shift;
register unsigned long msb;
-
mem_barrier();
Offset += (unsigned long)Base - (unsigned long)memBase;
shift = (Offset & 0x3) << 3;
@@ -561,11 +566,12 @@ readSparse8(pointer Base, register unsigned long Offset)
msb = Offset & hae_mask;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
-
result = *(vuip) ((unsigned long)memSBase + (Offset << 5));
result >>= shift;
return 0xffUL & result;
@@ -584,7 +590,9 @@ readSparse16(pointer Base, register unsigned long Offset)
msb = Offset & hae_mask;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
@@ -612,7 +620,9 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
@@ -631,7 +641,9 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
@@ -659,7 +671,9 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
@@ -677,7 +691,9 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask ;
Offset -= msb;
if (msb_set != msb) {
+#ifndef __NetBSD__
sethae(msb);
+#endif
msb_set = msb;
}
}
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 36943add1..cfea02602 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.2 2003/03/14 13:46:03 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.1tsi Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c
index f999561cf..9702ff0c7 100644
--- a/hw/xfree86/os-support/bsd/bsdResource.c
+++ b/hw/xfree86/os-support/bsd/bsdResource.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.8 2002/05/22 21:38:29 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.6 2001/02/16 14:45:10 tsi Exp $ */
/* Resource information code */
@@ -18,7 +18,7 @@ resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
#ifdef INCLUDE_XF86_NO_DOMAIN
-#if defined(__alpha__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
resPtr
xf86BusAccWindowsFromOS(void)
diff --git a/hw/xfree86/os-support/bsd/bsd_KbdMap.c b/hw/xfree86/os-support/bsd/bsd_KbdMap.c
index a47dc2384..c0a8f8890 100644
--- a/hw/xfree86/os-support/bsd/bsd_KbdMap.c
+++ b/hw/xfree86/os-support/bsd/bsd_KbdMap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
+/* $XFree86$ */
/*
* Slightly modified xf86KbdBSD.c which is
diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c
index adb101dc5..ea3271629 100644
--- a/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.6 1998/07/25 16:56:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.5.4.3 1998/06/05 16:23:03 dawes Exp $ */
/*
* Derived from VTsw_usl.c which is
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
index 250e5cb55..6ed48d89b 100644
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_apm.c,v 1.1 2000/02/29 03:09:25 dawes Exp $ */
+/* $XFree86$ */
#include "X.h"
#include "os.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_axp.c b/hw/xfree86/os-support/bsd/bsd_axp.c
index c38ac073c..0f392a8a0 100644
--- a/hw/xfree86/os-support/bsd/bsd_axp.c
+++ b/hw/xfree86/os-support/bsd/bsd_axp.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
+/* $XFree86: bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
#include "X.h"
#include "os.h"
@@ -23,9 +23,9 @@ axpDevice bsdGetAXP(void);
typedef struct {
char *name;
int type;
-} AXP;
+} _AXP;
-static AXP axpList[] = {
+static _AXP axpList[] = {
{"apecs",APECS},
{"pyxis",PYXIS},
{"cia",CIA},
diff --git a/hw/xfree86/os-support/bsd/bsd_ev56.c b/hw/xfree86/os-support/bsd/bsd_ev56.c
index ec95306e8..2952e9401 100644
--- a/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.2 2001/02/27 23:05:00 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.1 2000/03/05 16:59:17 dawes Exp $ */
#include "X.h"
#include "input.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 8b786a7c8..c76c9f748 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.20 2003/06/30 16:52:57 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.21 2003/09/24 02:43:34 dawes Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -160,7 +160,7 @@ xf86OpenConsole()
/* check if we are run with euid==0 */
if (geteuid() != 0)
{
- FatalError("xf86OpenConsole: Server must be suid root\n");
+ FatalError("xf86OpenConsole: Server must be suid root");
}
if (!KeepTty)
@@ -198,7 +198,7 @@ xf86OpenConsole()
strcat(cons_drivers, supported_drivers[i]);
}
FatalError(
- "%s: No console driver found\n\tSupported drivers: %s\n\t%s\n",
+ "%s: No console driver found\n\tSupported drivers: %s\n\t%s",
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
}
#if 0 /* stdin is already closed in OsInit() */
@@ -213,7 +213,7 @@ xf86OpenConsole()
case PCCONS:
if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
{
- FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s\n",
+ FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
"xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG);
}
@@ -282,18 +282,18 @@ acquire_vt:
vtmode.frsig = SIGUSR1;
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
+ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
}
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
{
- FatalError("xf86OpenConsole: KDENABIO failed (%s)\n",
+ FatalError("xf86OpenConsole: KDENABIO failed (%s)",
strerror(errno));
}
#endif
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
{
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
+ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
}
break;
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
@@ -337,7 +337,7 @@ xf86OpenPccons()
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
{
FatalError(
- "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s\n",
+ "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
"xf86OpenPccons",
strerror(errno),
"Was expecting pccons driver with X support",
@@ -427,11 +427,11 @@ xf86OpenSyscons()
{
if (syscons_version >= 0x100)
{
- FatalError("%s: Cannot find a free VT\n",
+ FatalError("%s: Cannot find a free VT",
"xf86OpenSyscons");
}
/* Should no longer reach here */
- FatalError("%s: %s %s\n\t%s %s\n",
+ FatalError("%s: %s %s\n\t%s %s",
"xf86OpenSyscons",
"syscons versions prior to 1.0 require",
"either the",
@@ -450,18 +450,18 @@ xf86OpenSyscons()
#endif
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
{
- FatalError("xf86OpenSyscons: Cannot open %s (%s)\n",
+ FatalError("xf86OpenSyscons: Cannot open %s (%s)",
vtname, strerror(errno));
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenSyscons: VT_GETMODE failed\n");
+ FatalError("xf86OpenSyscons: VT_GETMODE failed");
}
xf86Info.consType = SYSCONS;
xf86Msg(X_PROBED, "Using syscons driver with X support");
if (syscons_version >= 0x100)
{
- xf86ErrorF(" (version %d.%d)\n", syscons_version >> 8,
+ xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
syscons_version & 0xFF);
}
else
@@ -515,7 +515,7 @@ xf86OpenPcvt()
{
if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("%s: VT_GETMODE failed\n%s%s\n%s\n",
+ FatalError("%s: VT_GETMODE failed\n%s%s\n%s",
"xf86OpenPcvt",
"Found pcvt driver but X11 seems to be",
" not supported.", CHECK_DRIVER_MSG);
@@ -554,7 +554,7 @@ xf86OpenPcvt()
}
else
{
- FatalError("%s: Cannot find a free VT\n",
+ FatalError("%s: Cannot find a free VT",
"xf86OpenPcvt");
}
}
@@ -564,12 +564,12 @@ xf86OpenPcvt()
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{
- FatalError("xf86OpenPcvt: Cannot open %s (%s)\n",
+ FatalError("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenPcvt: VT_GETMODE failed\n");
+ FatalError("xf86OpenPcvt: VT_GETMODE failed");
}
xf86Info.consType = PCVT;
#ifdef WSCONS_SUPPORT
@@ -616,7 +616,7 @@ xf86OpenWScons()
}
if (fd != -1) {
if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
- FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s\n",
+ FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s",
"xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG);
}
@@ -654,7 +654,7 @@ xf86CloseConsole()
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
{
- xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)\n",
+ xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
strerror(errno));
}
#endif
@@ -678,7 +678,7 @@ xf86CloseConsole()
close(xf86Info.consoleFd);
if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
{
- xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)\n",
+ xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
strerror(errno));
}
}
diff --git a/hw/xfree86/os-support/bsd/bsd_io.c b/hw/xfree86/os-support/bsd/bsd_io.c
index 0f40ba707..d4689ce21 100644
--- a/hw/xfree86/os-support/bsd/bsd_io.c
+++ b/hw/xfree86/os-support/bsd/bsd_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.23 2002/10/21 20:38:04 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.22 2002/05/18 21:15:16 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Dawes <dawes@xfree86.org>
diff --git a/hw/xfree86/os-support/bsd/bsd_jstk.c b/hw/xfree86/os-support/bsd/bsd_jstk.c
index 7f24124dc..93626b6f8 100644
--- a/hw/xfree86/os-support/bsd/bsd_jstk.c
+++ b/hw/xfree86/os-support/bsd/bsd_jstk.c
@@ -23,7 +23,7 @@
/* Modified for FreeBSD by David Dawes <dawes@XFree86.org> */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.8 2002/08/06 13:20:47 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.7 1998/07/25 16:56:34 dawes Exp $ */
#include <sys/types.h>
#include <unistd.h>
diff --git a/hw/xfree86/os-support/bsd/bsd_kbd.c b/hw/xfree86/os-support/bsd/bsd_kbd.c
index 724aea19c..871bd2411 100644
--- a/hw/xfree86/os-support/bsd/bsd_kbd.c
+++ b/hw/xfree86/os-support/bsd/bsd_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.6 2003/06/30 16:52:57 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.8 2003/11/04 03:16:58 tsi Exp $ */
/*
* Copyright (c) 2002 by The XFree86 Project, Inc.
@@ -33,7 +33,7 @@ static KbdProtocolRec protocols[] = {
#ifdef WSCONS_SUPPORT
{"wskbd", PROT_WSCONS },
#endif
- { NULL, PROT_UNKNOWN }
+ { NULL, PROT_UNKNOWN_KBD }
};
typedef struct {
@@ -408,7 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
- KbdProtocolId prot = PROT_UNKNOWN;
+ KbdProtocolId prot = PROT_UNKNOWN_KBD;
char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
@@ -497,7 +497,7 @@ OpenKeyboard(InputInfoPtr pInfo)
#endif
default:
xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
- pKbd->wsKbdType, pInfo->name);
+ pInfo->name, pKbd->wsKbdType);
close(pInfo->fd);
return FALSE;
}
diff --git a/hw/xfree86/os-support/bsd/bsd_kbd.h b/hw/xfree86/os-support/bsd/bsd_kbd.h
index c042d88bf..7b9cd434e 100644
--- a/hw/xfree86/os-support/bsd/bsd_kbd.h
+++ b/hw/xfree86/os-support/bsd/bsd_kbd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.h,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
+/* $XFree86$ */
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);
diff --git a/hw/xfree86/os-support/bsd/bsd_kmod.c b/hw/xfree86/os-support/bsd/bsd_kmod.c
index 74345654b..37139e8dd 100644
--- a/hw/xfree86/os-support/bsd/bsd_kmod.c
+++ b/hw/xfree86/os-support/bsd/bsd_kmod.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kmod.c,v 3.2 2002/11/29 17:47:24 tsi Exp $ */
+/* $XFree86$ */
#include <errno.h>
#include <fcntl.h>
diff --git a/hw/xfree86/os-support/bsd/libusb/data.c b/hw/xfree86/os-support/bsd/libusb/data.c
index bb84e5566..3d88b075f 100644
--- a/hw/xfree86/os-support/bsd/libusb/data.c
+++ b/hw/xfree86/os-support/bsd/libusb/data.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/data.c,v 1.1 2000/02/11 18:06:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/data.c,v 1.1.2.2 1999/12/03 10:12:41 hohndel Exp $ */
#include <assert.h>
#include <stdlib.h>
diff --git a/hw/xfree86/os-support/bsd/libusb/descr.c b/hw/xfree86/os-support/bsd/libusb/descr.c
index f75418964..a3bc237dc 100644
--- a/hw/xfree86/os-support/bsd/libusb/descr.c
+++ b/hw/xfree86/os-support/bsd/libusb/descr.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/descr.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/descr.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
#include <sys/types.h>
diff --git a/hw/xfree86/os-support/bsd/libusb/parse.c b/hw/xfree86/os-support/bsd/libusb/parse.c
index 8c1a8b8a2..8e1c802c9 100644
--- a/hw/xfree86/os-support/bsd/libusb/parse.c
+++ b/hw/xfree86/os-support/bsd/libusb/parse.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/parse.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/parse.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
#include <assert.h>
#include <stdlib.h>
diff --git a/hw/xfree86/os-support/bsd/libusb/usage.c b/hw/xfree86/os-support/bsd/libusb/usage.c
index 9338e61d4..eb51a2fcc 100644
--- a/hw/xfree86/os-support/bsd/libusb/usage.c
+++ b/hw/xfree86/os-support/bsd/libusb/usage.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usage.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usage.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
#include <ctype.h>
#include <err.h>
diff --git a/hw/xfree86/os-support/bsd/libusb/usb.3 b/hw/xfree86/os-support/bsd/libusb/usb.3
index f88a28cd6..db0b1b08f 100644
--- a/hw/xfree86/os-support/bsd/libusb/usb.3
+++ b/hw/xfree86/os-support/bsd/libusb/usb.3
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.3,v 1.1 2000/02/11 18:06:50 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.3,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $
.\"
.Dd May 11, 1999
.Dt USB 3
diff --git a/hw/xfree86/os-support/bsd/libusb/usb.h b/hw/xfree86/os-support/bsd/libusb/usb.h
index 69ef79a62..445428118 100644
--- a/hw/xfree86/os-support/bsd/libusb/usb.h
+++ b/hw/xfree86/os-support/bsd/libusb/usb.h
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */
#define _DIAGASSERT(e) assert(e)
diff --git a/hw/xfree86/os-support/bsd/libusb/usb_hid_usages b/hw/xfree86/os-support/bsd/libusb/usb_hid_usages
index 711ba206a..48c7b1351 100644
--- a/hw/xfree86/os-support/bsd/libusb/usb_hid_usages
+++ b/hw/xfree86/os-support/bsd/libusb/usb_hid_usages
@@ -9,7 +9,7 @@
# If the number is * then the line matches all usages and the name
# is a printf formatting string that will be given the usage number.
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb_hid_usages,v 1.1 2000/02/11 18:06:51 dawes Exp $
+# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb_hid_usages,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $
#
1 Generic Desktop
0x00 Undefined
diff --git a/hw/xfree86/os-support/bsd/libusb/usbvar.h b/hw/xfree86/os-support/bsd/libusb/usbvar.h
index cb0bf33ec..60883dd47 100644
--- a/hw/xfree86/os-support/bsd/libusb/usbvar.h
+++ b/hw/xfree86/os-support/bsd/libusb/usbvar.h
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usbvar.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usbvar.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */
struct report_desc {
unsigned int size;
diff --git a/hw/xfree86/os-support/bsd/memrange.h b/hw/xfree86/os-support/bsd/memrange.h
index 99be9ea2f..f1d22f4fa 100644
--- a/hw/xfree86/os-support/bsd/memrange.h
+++ b/hw/xfree86/os-support/bsd/memrange.h
@@ -3,7 +3,7 @@
*
* $FreeBSD: src/sys/sys/memrange.h,v 1.4 1999/12/29 04:24:44 peter Exp $
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/memrange.h,v 1.1 2002/08/06 13:25:36 herrb Exp $ */
+/* $XFree86$ */
#ifndef _MEMRANGE_H
#define _MEMRANGE_H
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index 4f077a630..af2867f90 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */
+/* $XFree86: ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -80,7 +80,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
PROT_READ : (PROT_READ | PROT_WRITE),
MAP_SHARED, fd, Base);
if (base == MAP_FAILED)
- FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
"xf86MapVidMem", Size, Base, strerror(errno));
return base;
@@ -102,7 +102,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if (kmem == -1) {
kmem = open(DEV_MEM, 2);
if (kmem == -1) {
- FatalError("xf86ReadBIOS: open %s\n", DEV_MEM);
+ FatalError("xf86ReadBIOS: open %s", DEV_MEM);
}
}
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index 8619b5df7..760bf78b3 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */
+/* $XFree86: sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -71,7 +71,7 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
PROT_READ : (PROT_READ | PROT_WRITE),
MAP_SHARED, fd, Base);
if (base == MAP_FAILED)
- FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
"xf86MapVidMem", Size, Base, strerror(errno));
return base;
}
diff --git a/hw/xfree86/os-support/bus/460gxPCI.c b/hw/xfree86/os-support/bus/460gxPCI.c
index af4e230e6..3b16f401a 100644
--- a/hw/xfree86/os-support/bus/460gxPCI.c
+++ b/hw/xfree86/os-support/bus/460gxPCI.c
@@ -201,46 +201,32 @@ Get460GXBridgeResources(int bus,
* the chipset scan is to be stopped, or FALSE if the scan is to move on to the
* next chipset.
*/
-
Bool
-xorgProbe460GX(scanpciWrapperOpt flags)
+xf86PreScan460GX(void)
{
pciBusInfo_t *pBusInfo;
PCITAG tag;
+ CARD32 tmp;
+ int i, devno;
/* Bus zero should already be set up */
if (!(pBusInfo = pciBusInfo[0])) {
cbn_460gx = -1;
return FALSE;
}
+
/* First look for a 460GX's primary host bridge */
tag = PCI_MAKE_TAG(0, 0x10, 0);
- if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
- return TRUE;
+ if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
+ cbn_460gx = -1;
+ return FALSE;
}
- cbn_460gx = -1;
-
- return FALSE;
-}
-
-void
-xf86PreScan460GX(void)
-{
- pciBusInfo_t *pBusInfo;
- PCITAG tag;
- CARD32 tmp;
- int i, devno;
-
- if (!(pBusInfo = pciBusInfo[0]))
- return;
-
/* Get CBN (Chipset bus number) */
- tag = PCI_MAKE_TAG(0, 0x10, 0);
if (!(cbn_460gx = (unsigned int)pciReadByte(tag, CBN))) {
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
if (pciNumBuses <= cbn_460gx)
@@ -256,7 +242,7 @@ xf86PreScan460GX(void)
if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
/*
@@ -271,7 +257,7 @@ xf86PreScan460GX(void)
DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
if (devno == 0x10)
@@ -292,7 +278,7 @@ xf86PreScan460GX(void)
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
/*
@@ -308,7 +294,7 @@ xf86PreScan460GX(void)
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
/*
@@ -324,7 +310,7 @@ xf86PreScan460GX(void)
break;
/* Sanity check failed */
cbn_460gx = -1;
- return;
+ return TRUE;
}
}
@@ -351,7 +337,7 @@ xf86PreScan460GX(void)
break;
}
- return;
+ return TRUE;
}
/* This does some 460GX-related processing after the PCI bus scan */
diff --git a/hw/xfree86/os-support/bus/460gxPCI.h b/hw/xfree86/os-support/bus/460gxPCI.h
index 9459705d0..2ae9c3528 100644
--- a/hw/xfree86/os-support/bus/460gxPCI.h
+++ b/hw/xfree86/os-support/bus/460gxPCI.h
@@ -29,10 +29,8 @@
#define PCI_460GX_H 1
#include <X11/Xdefs.h>
-#include <Pci.h>
-Bool xorgProbe460GX(scanpciWrapperOpt flags);
-void xf86PreScan460GX(void);
+Bool xf86PreScan460GX(void);
void xf86PostScan460GX(void);
#endif
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index 4be660a75..f81112474 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.3 2003/06/10 20:48:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.2tsi Exp $ */
#include <fcntl.h>
#include <stdio.h>
@@ -170,6 +170,8 @@ promIsP1275(void)
promP1275 = TRUE;
else
promP1275 = FALSE;
+#elif defined(__FreeBSD__)
+ promP1275 = TRUE;
#else
#error Missing promIsP1275() function for this OS
#endif
diff --git a/hw/xfree86/os-support/bus/axpPci.c b/hw/xfree86/os-support/bus/axpPci.c
index 04ff8b956..d218a0d2f 100644
--- a/hw/xfree86/os-support/bus/axpPci.c
+++ b/hw/xfree86/os-support/bus/axpPci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.15 2002/12/12 04:12:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.14 2002/12/11 02:44:28 dawes Exp $ */
/*
* Copyright 1998 by Concurrent Computer Corporation
*
diff --git a/hw/xfree86/os-support/bus/e8870PCI.c b/hw/xfree86/os-support/bus/e8870PCI.c
index 9eb34a67a..adbd189f1 100644
--- a/hw/xfree86/os-support/bus/e8870PCI.c
+++ b/hw/xfree86/os-support/bus/e8870PCI.c
@@ -34,23 +34,17 @@
#include "Pci.h"
Bool
-xorgProbeE8870(scanpciWrapperOpt flags)
+xf86PreScanE8870(void)
{
PCITAG tag;
/* Look for an E8870's Hub interface */
tag = PCI_MAKE_TAG(0, 0x1E, 0);
- if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_82801_P2P))
- return TRUE;
-
- return FALSE;
-}
+ if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P))
+ return FALSE;
-void
-xf86PreScanE8870(void)
-{
/* XXX Fill me in... */
- return;
+ return TRUE;
}
void
diff --git a/hw/xfree86/os-support/bus/e8870PCI.h b/hw/xfree86/os-support/bus/e8870PCI.h
index 2d16077ac..b910bcfd8 100644
--- a/hw/xfree86/os-support/bus/e8870PCI.h
+++ b/hw/xfree86/os-support/bus/e8870PCI.h
@@ -29,10 +29,8 @@
#define PCI_E8870_H 1
#include <X11/Xdefs.h>
-#include <Pci.h>
-Bool xorgProbeE8870(scanpciWrapperOpt flags);
-void xf86PreScanE8870(void);
+Bool xf86PreScanE8870(void);
void xf86PostScanE8870(void);
#endif
diff --git a/hw/xfree86/os-support/bus/freebsdPci.c b/hw/xfree86/os-support/bus/freebsdPci.c
index c3e621daf..3b2bf5a9b 100644
--- a/hw/xfree86/os-support/bus/freebsdPci.c
+++ b/hw/xfree86/os-support/bus/freebsdPci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.5 2002/08/27 22:07:07 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.4 2002/07/24 19:06:52 tsi Exp $ */
/*
* Copyright 1998 by Concurrent Computer Corporation
*
@@ -84,7 +84,7 @@ static pciBusInfo_t freebsdPci0 = {
/* bridge */ NULL
};
-#if !defined(__OpenBSD__)
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
#if X_BYTE_ORDER == X_BIG_ENDIAN
#ifdef __sparc__
#ifndef ASI_PL
diff --git a/hw/xfree86/os-support/bus/ppcPci.c b/hw/xfree86/os-support/bus/ppcPci.c
index 2aa98355b..7b00acb6b 100644
--- a/hw/xfree86/os-support/bus/ppcPci.c
+++ b/hw/xfree86/os-support/bus/ppcPci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.9 2002/08/27 22:07:07 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.8 2002/07/24 19:06:52 tsi Exp $ */
/*
* ppcPci.c - PowerPC PCI access functions
*
diff --git a/hw/xfree86/os-support/bus/xf86Sbus.h b/hw/xfree86/os-support/bus/xf86Sbus.h
index 5c8acfd4b..dbd17810f 100644
--- a/hw/xfree86/os-support/bus/xf86Sbus.h
+++ b/hw/xfree86/os-support/bus/xf86Sbus.h
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.5 2002/05/22 21:38:30 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.3 2001/04/20 17:02:43 tsi Exp $ */
#ifndef _XF86_SBUS_H
#define _XF86_SBUS_H
@@ -35,7 +35,13 @@
#elif defined(__OpenBSD__) && defined(__sparc64__)
/* XXX */
#elif defined(CSRG_BASED)
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/fbio.h>
+#include <dev/ofw/openpromio.h>
+#else
#include <machine/fbio.h>
+#endif
#else
#include <sun/fbio.h>
#endif
diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c
index ce3260c26..5d4d6a991 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.c
+++ b/hw/xfree86/os-support/bus/zx1PCI.c
@@ -465,7 +465,13 @@ static pciBusInfo_t zx1FakeBus = {
NULL, /* bridge -- dynamically set */
};
-void
+/*
+ * This checks for, and validates, the presence of the ZX1 chipset, and sets
+ * pZX1mio to a non-NULL pointer accordingly. This function is called before
+ * the server's PCI bus scan and returns TRUE if the chipset scan is to be
+ * stopped, or FALSE if the scan is to move on to the next chipset.
+ */
+Bool
xf86PreScanZX1(void)
{
resRange range;
@@ -485,7 +491,7 @@ xf86PreScanZX1(void)
mapSize = MIO_SIZE;
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
- return;
+ return FALSE;
/* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */
if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
@@ -494,7 +500,7 @@ xf86PreScanZX1(void)
DEVID(VENDOR_HP, CHIP_ZX1_IOC))) {
xf86UnMapVidMem(-1, pZX1mio, mapSize);
pZX1mio = NULL;
- return;
+ return FALSE;
}
/* Map rope configuration space */
@@ -504,7 +510,7 @@ xf86PreScanZX1(void)
!(pZX1ioa = xf86MapVidMem(-1, VIDMEM_MMIO, ioaaddr, IOA_SIZE))) {
xf86UnMapVidMem(-1, pZX1mio, mapSize);
pZX1mio = NULL;
- return;
+ return TRUE;
}
for (i = 0; i < 8; i++) {
@@ -918,7 +924,7 @@ xf86PreScanZX1(void)
nRange = 0;
- return;
+ return TRUE;
}
/* This is called to finalise the results of a PCI bus scan */
diff --git a/hw/xfree86/os-support/bus/zx1PCI.h b/hw/xfree86/os-support/bus/zx1PCI.h
index f46a68a30..b1e8a95b5 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.h
+++ b/hw/xfree86/os-support/bus/zx1PCI.h
@@ -30,7 +30,7 @@
#include <X11/Xdefs.h>
-void xf86PreScanZX1(void);
+Bool xf86PreScanZX1(void);
void xf86PostScanZX1(void);
#endif
diff --git a/hw/xfree86/os-support/drm/drmmodule.c b/hw/xfree86/os-support/drm/drmmodule.c
index 8be822445..2fb082c36 100644
--- a/hw/xfree86/os-support/drm/drmmodule.c
+++ b/hw/xfree86/os-support/drm/drmmodule.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.3 2000/06/17 00:03:34 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.2 2000/02/23 04:47:22 martin Exp $
*
*/
@@ -39,7 +39,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
index 6203cc3c3..e9cb6125a 100644
--- a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
+++ b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
@@ -1,3 +1,5 @@
+/* $XFree86$ */
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
@@ -173,7 +175,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
case 0x0f:
xf86DrvMsg(pInt->scrnIndex, X_ERROR,
- "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8x\n", X86_CS, X86_EIP);
+ "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8lx\n", X86_CS, X86_EIP);
goto op0ferr;
default:
diff --git a/hw/xfree86/os-support/linux/lnx.h b/hw/xfree86/os-support/linux/lnx.h
index f2dd16267..b2adcd514 100644
--- a/hw/xfree86/os-support/linux/lnx.h
+++ b/hw/xfree86/os-support/linux/lnx.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx.h,v 3.3 2002/11/25 14:05:04 eich Exp $ */
+/* $XFree86: Exp $ */
#ifndef LNX_H_
# ifdef __alpha__
diff --git a/hw/xfree86/os-support/linux/lnxResource.c b/hw/xfree86/os-support/linux/lnxResource.c
index 04e2f07c0..25ef8cc91 100644
--- a/hw/xfree86/os-support/linux/lnxResource.c
+++ b/hw/xfree86/os-support/linux/lnxResource.c
@@ -190,7 +190,8 @@ xf86AccResFromOS(resPtr ret)
defined(__s390__) || \
defined(__hppa__)
- /* XXX this isn't exactly correct but it will get the server working
+ /*
+ * XXX this isn't exactly correct but it will get the server working
* for now until we get something better.
*/
@@ -203,7 +204,7 @@ xf86BusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1);
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__powerpc__)
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@@ -221,7 +222,7 @@ xf86PciBusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1);
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__powerpc__)
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@@ -230,7 +231,7 @@ xf86PciBusAccWindowsFromOS(void)
return ret;
}
-#ifdef INCLUDE_UNUSED */
+#ifdef INCLUDE_UNUSED
resPtr
xf86IsaBusAccWindowsFromOS(void)
@@ -241,7 +242,7 @@ xf86IsaBusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1);
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__powerpc__)
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@@ -267,7 +268,7 @@ xf86AccResFromOS(resPtr ret)
ret = xf86AddResToList(ret, &range, -1);
RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
ret = xf86AddResToList(ret, &range, -1);
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__powerpc__)
RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
#else
RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
diff --git a/hw/xfree86/os-support/linux/lnx_KbdMap.c b/hw/xfree86/os-support/linux/lnx_KbdMap.c
index 25639d72d..993679d81 100644
--- a/hw/xfree86/os-support/linux/lnx_KbdMap.c
+++ b/hw/xfree86/os-support/linux/lnx_KbdMap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
+/* $XFree86$ */
/*
* Slightly modified xf86KbdLnx.c which is
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 05e299b11..58f1062da 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -263,14 +263,14 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (offset % AGP_PAGE_SIZE != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "offset (0x%x) is not page-aligned (%d)\n",
+ "offset (0x%lx) is not page-aligned (%d)\n",
offset, AGP_PAGE_SIZE);
return FALSE;
}
pageOffset = offset / AGP_PAGE_SIZE;
xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86BindGARTMemory: bind key %d at 0x%08x "
+ "xf86BindGARTMemory: bind key %d at 0x%08lx "
"(pgoffset %d)\n", key, offset, pageOffset);
bind.pg_start = pageOffset;
@@ -279,7 +279,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
"binding of gart memory with key %d\n"
- "\tat offset 0x%x failed (%s)\n",
+ "\tat offset 0x%lx failed (%s)\n",
key, offset, strerror(errno));
return FALSE;
}
@@ -332,8 +332,8 @@ xf86EnableAGP(int screenNum, CARD32 mode)
setup.agp_mode = mode;
if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
- "AGPIOC_SETUP with mode %d failed (%s)\n",
- mode, strerror(errno));
+ "AGPIOC_SETUP with mode %ld failed (%s)\n",
+ (unsigned long)mode, strerror(errno));
return FALSE;
}
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index f2f326959..1f9142a6b 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.13 2002/10/16 01:24:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.12 2001/12/24 22:54:31 dawes Exp $ */
#include "X.h"
#include "os.h"
diff --git a/hw/xfree86/os-support/linux/lnx_axp.c b/hw/xfree86/os-support/linux/lnx_axp.c
index 5813ef4e9..106aa2804 100644
--- a/hw/xfree86/os-support/linux/lnx_axp.c
+++ b/hw/xfree86/os-support/linux/lnx_axp.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.5 2002/11/25 14:05:04 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.3 2001/02/15 11:03:56 alanh Exp $ */
#include <stdio.h>
#include "X.h"
diff --git a/hw/xfree86/os-support/linux/lnx_ev56.c b/hw/xfree86/os-support/linux/lnx_ev56.c
index bfcb0d70f..8381fec27 100644
--- a/hw/xfree86/os-support/linux/lnx_ev56.c
+++ b/hw/xfree86/os-support/linux/lnx_ev56.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.7 2002/11/25 14:05:04 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.5 2000/02/17 13:45:49 dawes Exp $ */
#include "X.h"
#include "input.h"
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 0ac8c6a8b..ea305e38d 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -1,3 +1,4 @@
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.15 2003/12/02 20:45:13 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.14 2001/10/31 22:50:30 tsi Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
@@ -7,19 +8,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Orest Zborowski and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Orest Zborowski and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Orest Zborowski
- * and David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * and David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
- * FOR 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
+ * OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
+ * FOR 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.
*
*/
@@ -35,6 +36,8 @@
#include "xf86_OSlib.h"
#include "lnx.h"
+#include <sys/stat.h>
+
#ifdef USE_DEV_FB
extern char *getenv(const char *);
#include <linux/fb.h>
@@ -45,13 +48,44 @@ static Bool KeepTty = FALSE;
static int VTnum = -1;
static int activeVT = -1;
+static int vtPermSave[4];
+static char vtname[11];
+
+static int
+saveVtPerms(void)
+{
+ /* We need to use stat to get permissions. */
+ struct stat svtp;
+
+ /* Do them numerically ordered, hard coded tty0 first. */
+ if (stat("/dev/tty0", &svtp) != 0)
+ return 0;
+ vtPermSave[0] = (int)svtp.st_uid;
+ vtPermSave[1] = (int)svtp.st_gid;
+
+ /* Now check the console we are dealing with. */
+ if (stat(vtname, &svtp) != 0)
+ return 0;
+ vtPermSave[2] = (int)svtp.st_uid;
+ vtPermSave[3] = (int)svtp.st_gid;
+
+ return 1;
+}
+
+static void
+restoreVtPerms(void)
+{
+ /* Set the terminal permissions back to before we started. */
+ chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
+ chown(vtname, vtPermSave[2], vtPermSave[3]);
+}
+
void
xf86OpenConsole(void)
{
int i, fd = -1;
int result;
struct vt_mode VT;
- char vtname[11];
struct vt_stat vts;
MessageType from = X_PROBED;
#ifdef USE_DEV_FB
@@ -61,7 +95,7 @@ xf86OpenConsole(void)
char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
- if (serverGeneration == 1)
+ if (serverGeneration == 1)
{
/* check if we're run with euid==0 */
if (geteuid() != 0)
@@ -124,6 +158,15 @@ xf86OpenConsole(void)
xf86Info.vtno, strerror(errno));
}
+ /*
+ * Grab the vt ownership before we overwrite it.
+ * Hard coded /dev/tty0 into this function as well for below.
+ */
+ if (!saveVtPerms()){
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: Could not save ownership of VT\n");
+ }
+
/* change ownership of the vt */
chown(vtname, getuid(), getgid());
@@ -171,7 +214,7 @@ xf86OpenConsole(void)
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
}
SYSCALL(result = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
- if (result < 0)
+ if (result < 0)
{
FatalError("xf86OpenConsole: VT_GETMODE failed\n");
}
@@ -181,7 +224,7 @@ xf86OpenConsole(void)
VT.mode = VT_PROCESS;
VT.relsig = SIGUSR1;
VT.acqsig = SIGUSR1;
- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
+ if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
{
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
}
@@ -202,7 +245,7 @@ xf86OpenConsole(void)
close(fbfd);
#endif
}
- else
+ else
{
/* serverGeneration != 1 */
/*
@@ -247,6 +290,9 @@ xf86CloseConsole()
activeVT = -1;
}
close(xf86Info.consoleFd); /* make the vt-manager happy */
+
+ restoreVtPerms(); /* restore the permissions */
+
return;
}
@@ -254,7 +300,7 @@ int
xf86ProcessArgument(int argc, char *argv[], int i)
{
/*
- * Keep server from detaching from controlling tty. This is useful
+ * Keep server from detaching from controlling tty. This is useful
* when debugging (so the server can receive keyboard signals.
*/
if (!strcmp(argv[i], "-keeptty"))
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 303c6e3d3..dda1ff8ef 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -90,10 +90,9 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* don't change, just test */
kbdrep_s.rate = -1;
kbdrep_s.delay = -1;
- if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+ if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
-
/* do the change */
if (rate == 0) /* switch repeat off */
kbdrep_s.rate = 0;
@@ -105,7 +104,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
- if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+ if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
@@ -130,8 +129,9 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
if (kbdrate_s.rate > 50)
kbdrate_s.rate = 50;
- if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
- return 0;
+ if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
+ return 0;
+ }
close( fd );
@@ -143,12 +143,7 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
#undef rate
-#if NeedFunctionPrototypes
void xf86SetKbdRepeat(char rad)
-#else
-void xf86SetKbdRepeat(rad)
-char rad;
-#endif
{
#ifdef __sparc__
int rate = 500; /* Default rate */
@@ -178,7 +173,6 @@ char rad;
if (xf86Info.kbdDelay >= 0)
delay = xf86Info.kbdDelay;
-
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
return;
diff --git a/hw/xfree86/os-support/linux/lnx_jstk.c b/hw/xfree86/os-support/linux/lnx_jstk.c
index 2423bd45e..90a8bc106 100644
--- a/hw/xfree86/os-support/linux/lnx_jstk.c
+++ b/hw/xfree86/os-support/linux/lnx_jstk.c
@@ -23,7 +23,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_jstk.c,v 3.13 1998/07/25 16:56:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_jstk.c,v 3.8.2.1 1998/06/05 16:23:12 dawes Exp $ */
static const char rcs_id[] = "Id: lnx_jstk.c,v 1.1 1995/12/20 14:06:09 lepied Exp";
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.c b/hw/xfree86/os-support/linux/lnx_kbd.c
index 1344cecec..68f3af38b 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.c
+++ b/hw/xfree86/os-support/linux/lnx_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.3 2003/08/19 17:32:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.4 2003/11/03 05:11:52 tsi Exp $ */
/*
* Copyright (c) 2002 by The XFree86 Project, Inc.
@@ -27,7 +27,7 @@
static KbdProtocolRec protocols[] = {
{"standard", PROT_STD },
- { NULL, PROT_UNKNOWN }
+ { NULL, PROT_UNKNOWN_KBD }
};
extern Bool VTSwitchEnabled;
@@ -117,7 +117,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* don't change, just test */
kbdrep_s.rate = -1;
kbdrep_s.delay = -1;
- if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+ if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
@@ -132,8 +132,8 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
- if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
- return 0;
+ if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
+ return 0;
}
return 1; /* success! */
@@ -157,8 +157,9 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
if (kbdrate_s.rate > 50)
kbdrate_s.rate = 50;
- if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
- return 0;
+ if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
+ return 0;
+ }
close( fd );
@@ -446,7 +447,7 @@ OpenKeyboard(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
- KbdProtocolId prot = PROT_UNKNOWN;
+ KbdProtocolId prot = PROT_UNKNOWN_KBD;
char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.h b/hw/xfree86/os-support/linux/lnx_kbd.h
index ac783bfbc..7b9cd434e 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.h
+++ b/hw/xfree86/os-support/linux/lnx_kbd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.h,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
+/* $XFree86$ */
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);
diff --git a/hw/xfree86/os-support/linux/lnx_kmod.c b/hw/xfree86/os-support/linux/lnx_kmod.c
index 0cb69b209..cf18bcab6 100644
--- a/hw/xfree86/os-support/linux/lnx_kmod.c
+++ b/hw/xfree86/os-support/linux/lnx_kmod.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kmod.c,v 3.6 2001/10/31 22:50:30 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kmod.c,v 3.5 2001/10/01 13:44:14 eich Exp $ */
#include <errno.h>
#include <fcntl.h>
diff --git a/hw/xfree86/os-support/linux/lnx_mouse.c b/hw/xfree86/os-support/linux/lnx_mouse.c
index 8bc7e6331..3d0d30f52 100644
--- a/hw/xfree86/os-support/linux/lnx_mouse.c
+++ b/hw/xfree86/os-support/linux/lnx_mouse.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.1 1999/05/17 13:17:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.2 2003/10/08 14:58:30 dawes Exp $ */
/*
* Copyright 1999 by The XFree86 Project, Inc.
@@ -8,6 +8,10 @@
#include "xf86.h"
#include "xf86Xinput.h"
#include "xf86OSmouse.h"
+#include "xf86_OSlib.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
static int
SupportedInterfaces(void)
@@ -15,6 +19,172 @@ SupportedInterfaces(void)
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
}
+static const char *
+DefaultProtocol(void)
+{
+ return "Auto";
+}
+
+#define DEFAULT_MOUSE_DEV "/dev/mouse"
+#define DEFAULT_PS2_DEV "/dev/psaux"
+#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata"
+#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata"
+
+static const char *mouseDevs[] = {
+ DEFAULT_MOUSE_DEV,
+ DEFAULT_PS2_DEV,
+ DEFAULT_GPM_DATA_DEV,
+ NULL
+};
+
+typedef enum {
+ MOUSE_PROTO_UNKNOWN = 0,
+ MOUSE_PROTO_SERIAL,
+ MOUSE_PROTO_PS2,
+ MOUSE_PROTO_MSC,
+ MOUSE_PROTO_GPM
+} protocolTypes;
+
+static struct {
+ protocolTypes proto;
+ const char *name;
+} devproto[] = {
+ { MOUSE_PROTO_UNKNOWN, NULL },
+ { MOUSE_PROTO_PS2, "PS/2" },
+ { MOUSE_PROTO_MSC, "MouseSystems" },
+ { MOUSE_PROTO_GPM, "GPM" }
+};
+
+static const char *
+FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+ int fd = -1;
+ const char **pdev;
+
+ for (pdev = mouseDevs; *pdev; pdev++) {
+ SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL));
+ if (fd == -1) {
+#ifdef DEBUG
+ ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
+#endif
+ } else
+ break;
+ }
+
+ if (*pdev) {
+ close(fd);
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, *pdev);
+ }
+
+ return *pdev;
+}
+
+static const char *
+GuessProtocol(InputInfoPtr pInfo, int flags)
+{
+ int fd = -1;
+ const char *dev;
+ char *realdev;
+ struct stat sbuf;
+ int i;
+ int proto = MOUSE_PROTO_UNKNOWN;
+
+ dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL);
+ if (!dev) {
+#ifdef DEBUG
+ ErrorF("xf86SetStrOption failed to return the device name\n");
+#endif
+ return NULL;
+ }
+ /* Look at the device name to guess the protocol. */
+ realdev = NULL;
+ if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) {
+ if (lstat(dev, &sbuf) != 0) {
+#ifdef DEBUG
+ ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ return NULL;
+ }
+ if (S_ISLNK(sbuf.st_mode)) {
+ realdev = xnfalloc(PATH_MAX + 1);
+ i = readlink(dev, realdev, PATH_MAX);
+ if (i <= 0) {
+#ifdef DEBUG
+ ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ xfree(realdev);
+ return NULL;
+ }
+ realdev[i] = '\0';
+ }
+ }
+ if (!realdev)
+ realdev = xnfstrdup(dev);
+ else {
+ /* If realdev doesn't contain a '/' then prepend "/dev/" */
+ if (!strchr(realdev, '/')) {
+ char *tmp = xnfalloc(strlen(realdev) + 5 + 1);
+ sprintf(tmp, "/dev/%s", realdev);
+ xfree(realdev);
+ realdev = tmp;
+ }
+ }
+
+ if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
+ proto = MOUSE_PROTO_PS2;
+ else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
+ proto = MOUSE_PROTO_MSC;
+ else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
+ proto = MOUSE_PROTO_GPM;
+ xfree(realdev);
+ /*
+ * If the protocol can't be guessed from the device name,
+ * try to characterise it.
+ */
+ if (proto == MOUSE_PROTO_UNKNOWN) {
+ SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL));
+ if (isatty(fd)) {
+ /* Serial PnP has already failed, so give up. */
+ } else {
+ if (fstat(fd, &sbuf) != 0) {
+#ifdef DEBUG
+ ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ close(fd);
+ return NULL;
+ }
+ if (S_ISFIFO(sbuf.st_mode)) {
+ /* Assume GPM data in MSC format. */
+ proto = MOUSE_PROTO_MSC;
+ } else {
+ /* Default to PS/2 */
+ proto = MOUSE_PROTO_PS2;
+ }
+ }
+ close(fd);
+ }
+ if (proto == MOUSE_PROTO_UNKNOWN) {
+ xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
+ pInfo->name);
+ return NULL;
+ } else {
+ for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
+ if (devproto[i].proto == proto) {
+ xf86Msg(X_INFO,
+ "%s: GuessProtocol: "
+ "setting mouse protocol to \"%s\"\n",
+ pInfo->name, devproto[i].name);
+ return devproto[i].name;
+ }
+ }
+ }
+ return NULL;
+}
+
OSMouseInfoPtr
xf86OSMouseInit(int flags)
{
@@ -24,6 +194,9 @@ xf86OSMouseInit(int flags)
if (!p)
return NULL;
p->SupportedInterfaces = SupportedInterfaces;
+ p->DefaultProtocol = DefaultProtocol;
+ p->FindDevice = FindDevice;
+ p->GuessProtocol = GuessProtocol;
return p;
}
diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c
index 5477b9130..41f76fd16 100644
--- a/hw/xfree86/os-support/linux/lnx_pci.c
+++ b/hw/xfree86/os-support/linux/lnx_pci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.9 2003/02/17 15:29:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.8 2002/04/09 15:59:37 tsi Exp $ */
#include <stdio.h>
#include "X.h"
diff --git a/hw/xfree86/os-support/lynxos/lynx_init.c b/hw/xfree86/os-support/lynxos/lynx_init.c
index 8565dcc5c..1787a7c8c 100644
--- a/hw/xfree86/os-support/lynxos/lynx_init.c
+++ b/hw/xfree86/os-support/lynxos/lynx_init.c
@@ -22,7 +22,7 @@
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_init.c,v 3.3 1998/08/29 05:43:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_init.c,v 3.2 1998/07/25 16:56:45 dawes Exp $ */
#include "X.h"
#include "Xmd.h"
diff --git a/hw/xfree86/os-support/lynxos/lynx_io.c b/hw/xfree86/os-support/lynxos/lynx_io.c
index e61ce76b7..3ace8f447 100644
--- a/hw/xfree86/os-support/lynxos/lynx_io.c
+++ b/hw/xfree86/os-support/lynxos/lynx_io.c
@@ -21,7 +21,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_io.c,v 3.10 2003/02/17 15:11:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_io.c,v 3.9 2002/10/11 01:40:35 dawes Exp $ */
#include "X.h"
diff --git a/hw/xfree86/os-support/lynxos/lynx_mmap.c b/hw/xfree86/os-support/lynxos/lynx_mmap.c
index dcf734965..fd45ba4ec 100644
--- a/hw/xfree86/os-support/lynxos/lynx_mmap.c
+++ b/hw/xfree86/os-support/lynxos/lynx_mmap.c
@@ -21,7 +21,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_mmap.c,v 3.6 2000/02/11 22:36:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_mmap.c,v 3.5 1998/08/29 05:43:58 dawes Exp $ */
#include "X.h"
diff --git a/hw/xfree86/os-support/lynxos/lynx_noinline.c b/hw/xfree86/os-support/lynxos/lynx_noinline.c
index 858b0eb65..7d6bedec9 100644
--- a/hw/xfree86/os-support/lynxos/lynx_noinline.c
+++ b/hw/xfree86/os-support/lynxos/lynx_noinline.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_noinline.c,v 3.6 2002/01/25 21:56:20 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_noinline.c,v 3.5 2000/07/31 23:25:18 tsi Exp $ */
/*
* Copyright 1998 by Metro Link Incorporated
*
diff --git a/hw/xfree86/os-support/lynxos/lynx_ppc.c b/hw/xfree86/os-support/lynxos/lynx_ppc.c
index e587b7ee0..12fa3bcae 100644
--- a/hw/xfree86/os-support/lynxos/lynx_ppc.c
+++ b/hw/xfree86/os-support/lynxos/lynx_ppc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.c,v 1.1 2002/12/14 04:41:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */
/*
* Copyright 1998 by Metro Link Incorporated
*
diff --git a/hw/xfree86/os-support/lynxos/lynx_video.c b/hw/xfree86/os-support/lynxos/lynx_video.c
index c667994b3..297d93bdf 100644
--- a/hw/xfree86/os-support/lynxos/lynx_video.c
+++ b/hw/xfree86/os-support/lynxos/lynx_video.c
@@ -21,7 +21,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_video.c,v 3.18 2002/12/14 04:41:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_video.c,v 3.17 2000/10/28 01:42:27 mvojkovi Exp $ */
#include "X.h"
#include "input.h"
diff --git a/hw/xfree86/os-support/misc/BUSmemcpy.S b/hw/xfree86/os-support/misc/BUSmemcpy.S
index e4ff36c62..83dab6f67 100644
--- a/hw/xfree86/os-support/misc/BUSmemcpy.S
+++ b/hw/xfree86/os-support/misc/BUSmemcpy.S
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */
/******************************************************************************
Copyright 1993 by Glenn G. Lai
diff --git a/hw/xfree86/os-support/misc/BUSmemcpy.c b/hw/xfree86/os-support/misc/BUSmemcpy.c
index acef268a1..27d53fa8f 100644
--- a/hw/xfree86/os-support/misc/BUSmemcpy.c
+++ b/hw/xfree86/os-support/misc/BUSmemcpy.c
@@ -12,7 +12,7 @@ Thanks to Linus Torvalds for contributing this code.
****************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.c,v 1.4 2000/02/12 20:45:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.c,v 1.3 1999/12/03 19:17:44 eich Exp $ */
#include "X.h"
#include "xf86.h"
diff --git a/hw/xfree86/os-support/misc/Delay.c b/hw/xfree86/os-support/misc/Delay.c
index b5de1d899..ce99e792a 100644
--- a/hw/xfree86/os-support/misc/Delay.c
+++ b/hw/xfree86/os-support/misc/Delay.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.4 2003/03/25 04:18:23 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.3 2000/12/08 20:13:38 eich Exp $ */
#ifdef __UNIXOS2__
#define I_NEED_OS2_H
diff --git a/hw/xfree86/os-support/misc/IODelay.S b/hw/xfree86/os-support/misc/IODelay.S
index 4c6e32f3f..685584653 100644
--- a/hw/xfree86/os-support/misc/IODelay.S
+++ b/hw/xfree86/os-support/misc/IODelay.S
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.S,v 1.1 1999/07/10 07:24:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */
/*******************************************************************************
Copyright 1994 by Glenn G. Lai
diff --git a/hw/xfree86/os-support/misc/IODelay.c b/hw/xfree86/os-support/misc/IODelay.c
index 57176c5d5..e14a86f91 100644
--- a/hw/xfree86/os-support/misc/IODelay.c
+++ b/hw/xfree86/os-support/misc/IODelay.c
@@ -4,7 +4,7 @@
Stub for Alpha Linux
*******************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.c,v 1.3 2000/08/04 16:13:41 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.c,v 1.1.2.1 1998/06/04 17:35:59 dawes Exp $ */
#include "X.h"
#include "xf86.h"
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.S b/hw/xfree86/os-support/misc/SlowBcopy.S
index 9b6af1d69..9fd73a0f9 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.S
+++ b/hw/xfree86/os-support/misc/SlowBcopy.S
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.s,v 1.2 1998/07/25 16:56:50 dawes Exp $ */
/*******************************************************************************
Copyright 1994 by Glenn G. Lai
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c
index 98546b688..727ec6598 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -4,7 +4,7 @@
for Alpha Linux
*******************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.6 2003/04/07 16:23:39 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.6tsi Exp $ */
/*
* Create a dependency that should be immune from the effect of register
@@ -26,13 +26,13 @@
void
xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
{
-#if defined(__ia64__)
- outb(0x80, 0x00);
-#endif
while(len--)
{
*dst++ = *src++;
-#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
+#if !defined(__sparc__) && \
+ !defined(__powerpc__) && \
+ !defined(__mips__) && \
+ !defined(__ia64__)
outb(0x80, 0x00);
#endif
}
diff --git a/hw/xfree86/os-support/misc/xf86_IlHack.c b/hw/xfree86/os-support/misc/xf86_IlHack.c
index 019156357..4172d3d39 100644
--- a/hw/xfree86/os-support/misc/xf86_IlHack.c
+++ b/hw/xfree86/os-support/misc/xf86_IlHack.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_IlHack.c,v 3.5 1998/07/25 16:56:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_IlHack.c,v 3.4.4.1 1998/06/04 17:36:01 dawes Exp $ */
/*
* This file is an incredible crock to get the normally-inline functions
* built into the server so that things can be debugged properly.
diff --git a/hw/xfree86/os-support/misc/xf86_Util.c b/hw/xfree86/os-support/misc/xf86_Util.c
index 7889617e3..1b73dc654 100644
--- a/hw/xfree86/os-support/misc/xf86_Util.c
+++ b/hw/xfree86/os-support/misc/xf86_Util.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_Util.c,v 3.8 2001/10/28 03:34:02 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_Util.c,v 3.7 1999/01/14 13:05:05 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
*
diff --git a/hw/xfree86/os-support/sco/VTsw_sco.c b/hw/xfree86/os-support/sco/VTsw_sco.c
index 899c3820b..d4ae2852f 100644
--- a/hw/xfree86/os-support/sco/VTsw_sco.c
+++ b/hw/xfree86/os-support/sco/VTsw_sco.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.4 2003/07/07 15:34:27 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.2 1998/07/25 16:56:57 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
* Copyright 1993 by David McCullough <davidm@stallion.oz.au>
diff --git a/hw/xfree86/os-support/sco/sco_init.c b/hw/xfree86/os-support/sco/sco_init.c
index 389664647..2b8a05be5 100644
--- a/hw/xfree86/os-support/sco/sco_init.c
+++ b/hw/xfree86/os-support/sco/sco_init.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_init.c,v 3.14 2002/11/20 23:00:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_init.c,v 3.13 2002/06/03 21:22:10 dawes Exp $ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
*
diff --git a/hw/xfree86/os-support/sco/sco_io.c b/hw/xfree86/os-support/sco/sco_io.c
index a018e3434..c9b7219cd 100644
--- a/hw/xfree86/os-support/sco/sco_io.c
+++ b/hw/xfree86/os-support/sco/sco_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_io.c,v 3.10 2003/02/17 15:11:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_io.c,v 3.9 2002/10/11 01:40:36 dawes Exp $ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
*
diff --git a/hw/xfree86/os-support/sco/sco_iop.c b/hw/xfree86/os-support/sco/sco_iop.c
index 85b4bbd41..913884385 100644
--- a/hw/xfree86/os-support/sco/sco_iop.c
+++ b/hw/xfree86/os-support/sco/sco_iop.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_iop.c,v 1.1 2002/06/03 21:22:10 dawes Exp $ */
+/* $XFree86$ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@caldera.com>
*
diff --git a/hw/xfree86/os-support/sco/sco_mouse.c b/hw/xfree86/os-support/sco/sco_mouse.c
index 37b9eb5a8..445afe822 100644
--- a/hw/xfree86/os-support/sco/sco_mouse.c
+++ b/hw/xfree86/os-support/sco/sco_mouse.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_mouse.c,v 3.13 2002/11/20 23:07:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_mouse.c,v 3.12 2001/06/30 22:41:49 tsi Exp $ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
*
diff --git a/hw/xfree86/os-support/sco/sco_video.c b/hw/xfree86/os-support/sco/sco_video.c
index 3c00f5564..a11d957e1 100644
--- a/hw/xfree86/os-support/sco/sco_video.c
+++ b/hw/xfree86/os-support/sco/sco_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.9 2003/03/14 13:46:07 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.8tsi Exp $ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
*
diff --git a/hw/xfree86/os-support/shared/VTsw_noop.c b/hw/xfree86/os-support/shared/VTsw_noop.c
index 265a45f91..6267da9a7 100644
--- a/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_noop.c,v 3.2 1998/07/25 16:56:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_noop.c,v 3.1.4.1 1998/06/05 16:23:20 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
*
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index 81aac54de..4ddb84450 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_usl.c,v 3.4 2002/09/16 18:06:14 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_usl.c,v 3.1.4.1 1998/06/05 16:23:21 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
*
diff --git a/hw/xfree86/os-support/shared/bios_devmem.c b/hw/xfree86/os-support/shared/bios_devmem.c
index 5c24b9751..c295c2146 100644
--- a/hw/xfree86/os-support/shared/bios_devmem.c
+++ b/hw/xfree86/os-support/shared/bios_devmem.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c,v 3.7 2000/09/19 12:46:22 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c,v 3.5 1998/09/13 00:51:32 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
*
diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c
index ee7584222..8f341e5e4 100644
--- a/hw/xfree86/os-support/shared/bios_mmap.c
+++ b/hw/xfree86/os-support/shared/bios_mmap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_mmap.c,v 1.9 2001/05/23 14:46:05 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_mmap.c,v 1.8 2000/11/19 16:38:06 tsi Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
*
diff --git a/hw/xfree86/os-support/shared/inout.S b/hw/xfree86/os-support/shared/inout.S
index 80c47c419..73a2cbbb6 100644
--- a/hw/xfree86/os-support/shared/inout.S
+++ b/hw/xfree86/os-support/shared/inout.S
@@ -4,7 +4,7 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/inout.S,v 1.1 1999/07/10 07:24:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/inout.s,v 3.5 1996/12/23 06:50:58 dawes Exp $ */
#include "assyntax.h"
diff --git a/hw/xfree86/os-support/shared/ioperm_noop.c b/hw/xfree86/os-support/shared/ioperm_noop.c
index c24f4f1b2..fc1e83255 100644
--- a/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/ioperm_noop.c,v 3.4 2001/07/23 13:15:48 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/ioperm_noop.c,v 3.3 1998/07/25 16:57:00 dawes Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
*
diff --git a/hw/xfree86/os-support/shared/std_kbdEv.c b/hw/xfree86/os-support/shared/std_kbdEv.c
index 329346910..934ebbdba 100644
--- a/hw/xfree86/os-support/shared/std_kbdEv.c
+++ b/hw/xfree86/os-support/shared/std_kbdEv.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/std_kbdEv.c,v 3.3 1999/05/07 02:56:23 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/std_kbdEv.c,v 3.2 1998/07/25 16:57:01 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Dawes <dawes@xfree86.org>
diff --git a/hw/xfree86/os-support/shared/sysv_kbd.c b/hw/xfree86/os-support/shared/sysv_kbd.c
index 1bb2da386..8e118938e 100644
--- a/hw/xfree86/os-support/shared/sysv_kbd.c
+++ b/hw/xfree86/os-support/shared/sysv_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sysv_kbd.c,v 3.4 1999/01/14 13:05:11 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sysv_kbd.c,v 3.3 1998/07/25 16:57:02 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Dawes <dawes@XFree86.org>
diff --git a/hw/xfree86/os-support/shared/xf86Axp.h b/hw/xfree86/os-support/shared/xf86Axp.h
index e63619e3a..5afef810c 100644
--- a/hw/xfree86/os-support/shared/xf86Axp.h
+++ b/hw/xfree86/os-support/shared/xf86Axp.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/xf86Axp.h,v 1.3 2001/02/15 19:46:03 eich Exp $ */
+/* $XFree86$ */
#ifndef _XF86_AXP_H_
#define _XF86_AXP_H_
diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c
index d1c79888b..dc984bd4b 100644
--- a/hw/xfree86/os-support/solaris/sun_bios.c
+++ b/hw/xfree86/os-support/solaris/sun_bios.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.2 2001/10/28 03:34:02 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.2tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -71,7 +71,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
if (!xf86LinearVidMem())
FatalError("xf86ReadBIOS: Could not mmap BIOS"
- " [a=%x]\n", Base);
+ " [a=%lx]\n", Base);
sprintf(solx86_vtname, apertureDevName);
}
@@ -86,7 +86,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if (ptr == MAP_FAILED)
{
xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed "
- "[0x%05x, 0x%04x]\n",
+ "[0x%08lx, 0x%04x]\n",
solx86_vtname, Base, mlen);
close(fd);
return -1;
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index b08529a00..c7382e0e1 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.6 2002/06/06 13:49:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.5 2001/11/25 13:51:24 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -26,6 +26,9 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
+#ifdef __i386
+# include <sys/kd.h>
+#endif
static Bool KeepTty = FALSE;
static Bool Protect0 = FALSE;
@@ -34,7 +37,11 @@ static int VTnum = -1;
static int xf86StartVT = -1;
#endif
+#if defined(__SOL8__) || !defined(__i386)
+static char fb_dev[PATH_MAX] = "/dev/fb";
+#else
static char fb_dev[PATH_MAX] = "/dev/console";
+#endif
void
xf86OpenConsole(void)
@@ -162,12 +169,15 @@ xf86OpenConsole(void)
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
-
+#endif
+#ifdef __i386
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
+#endif
}
else /* serverGeneration != 1 */
{
+#ifdef HAS_USL_VTS
/*
* Now re-get the VT
*/
@@ -245,6 +255,11 @@ xf86CloseConsole(void)
#endif
+#ifdef __i386
+ /* Reset the display back to text mode */
+ ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
+#endif
+
#ifdef HAS_USL_VTS
/*
@@ -261,8 +276,6 @@ xf86CloseConsole(void)
* Did the whole thing similarly to the way linux does it
*/
- /* Reset the display back to text mode */
- ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
{
VT.mode = VT_AUTO; /* Set default vt handling */
diff --git a/hw/xfree86/os-support/solaris/sun_inout.s b/hw/xfree86/os-support/solaris/sun_inout.s
index e8f03d0e8..5c0b23ef6 100644
--- a/hw/xfree86/os-support/solaris/sun_inout.s
+++ b/hw/xfree86/os-support/solaris/sun_inout.s
@@ -1,4 +1,4 @@
-/ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $
+/ $XFree86$
/
/ Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
/
diff --git a/hw/xfree86/os-support/solaris/sun_io.c b/hw/xfree86/os-support/solaris/sun_io.c
index 27996d312..9f3a235e5 100644
--- a/hw/xfree86/os-support/solaris/sun_io.c
+++ b/hw/xfree86/os-support/solaris/sun_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_io.c,v 1.3 2003/02/17 15:12:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_io.c,v 1.2 2002/10/11 01:40:37 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Dawes <dawes@xfree86.org>
diff --git a/hw/xfree86/os-support/solaris/sun_kbd.c b/hw/xfree86/os-support/solaris/sun_kbd.c
index 7e4998817..a48b7f176 100644
--- a/hw/xfree86/os-support/solaris/sun_kbd.c
+++ b/hw/xfree86/os-support/solaris/sun_kbd.c
@@ -23,12 +23,15 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* $XdotOrg:$ */
+#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
static int sun_otranslation = -1;
static int sun_odirect = -1;
+int sun_ktype;
int
xf86GetKbdLeds()
@@ -53,7 +56,8 @@ xf86SetKbdRepeat(char rad)
void
xf86KbdInit()
{
- int ktype, klayout;
+ int klayout;
+ const char *ktype_name;
if (xf86Info.kbdFd < 0) {
xf86Info.kbdFd = open("/dev/kbd", O_RDWR|O_NONBLOCK);
@@ -62,11 +66,11 @@ xf86KbdInit()
}
/*
- * None of the followin should ever fail. If it does, something is
+ * None of the following should ever fail. If it does, something is
* broken (IMO) - DWH 8/21/99
*/
- if (ioctl(xf86Info.kbdFd, KIOCTYPE, &ktype) < 0)
+ if (ioctl(xf86Info.kbdFd, KIOCTYPE, &sun_ktype) < 0)
FatalError("Unable to determine keyboard type: %d\n", errno);
if (ioctl(xf86Info.kbdFd, KIOCLAYOUT, &klayout) < 0)
@@ -77,6 +81,21 @@ xf86KbdInit()
if (ioctl(xf86Info.kbdFd, KIOCGDIRECT, &sun_odirect) < 0)
FatalError("Unable to determine keyboard direct setting\n");
+
+ switch (sun_ktype) {
+ case KB_SUN3:
+ ktype_name = "Sun Type 3"; break;
+ case KB_SUN4:
+ ktype_name = "Sun Type 4/5/6"; break;
+ case KB_USB:
+ ktype_name = "USB"; break;
+ case KB_PC:
+ ktype_name = "PC"; break;
+ default:
+ ktype_name = "Unknown"; break;
+ }
+ xf86Msg(X_PROBED, "Keyboard type: %s (%d)\n", ktype_name, sun_ktype);
+ xf86Msg(X_PROBED, "Keyboard layout: %d\n", klayout);
}
int
diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c
index 2e9cee2b1..09f73c410 100644
--- a/hw/xfree86/os-support/solaris/sun_mouse.c
+++ b/hw/xfree86/os-support/solaris/sun_mouse.c
@@ -1,4 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c,v 1.4 2002/01/25 21:56:21 tsi Exp $ */
+/* $XdotOrg$ */
/*
* Copyright 1999-2001 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -24,16 +25,53 @@
* dealings in this Software without prior written authorization from the
* XFree86 Project.
*/
+/* Copyright 2004 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.
+ */
#include "xf86.h"
#include "xf86_OSlib.h"
#include "xf86OSmouse.h"
-#if defined(__SOL8__) || !defined(i386)
+#if defined(__SOL8__) || !defined(__i386)
#include "xisb.h"
#include "mipointer.h"
+#include <sys/stropts.h>
#include <sys/vuid_event.h>
+#include <sys/msio.h>
+
+/* Wheel mouse support in VUID drivers in Solaris 9 updates & Solaris 10 */
+#ifdef WHEEL_DEVID /* Defined in vuid_event.h if VUID wheel support present */
+# define HAVE_VUID_WHEEL
+#endif
+#ifdef HAVE_VUID_WHEEL
+# include <sys/vuid_wheel.h>
+#endif
/* Names of protocols that are handled internally here. */
@@ -42,21 +80,71 @@ static const char *internalNames[] = {
NULL
};
+static const char *solarisMouseDevs[] = {
+ /* Device file: Protocol: */
+ "/dev/mouse", "VUID", /* USB or SPARC */
+#ifdef __i386
+ "/dev/kdmouse", "PS/2", /* PS/2 */
+#endif
+ NULL
+};
+
typedef struct _VuidMseRec {
Firm_event event;
unsigned char *buffer;
+ char *strmod;
} VuidMseRec, *VuidMsePtr;
static int vuidMouseProc(DeviceIntPtr pPointer, int what);
static void vuidReadInput(InputInfoPtr pInfo);
+/*
+ * Initialize and enable the mouse wheel, if present.
+ *
+ * Returns 1 if mouse wheel was successfully enabled.
+ * Returns 0 if an error occurred or if there is no mouse wheel.
+ */
+static int
+vuidMouseWheelInit(InputInfoPtr pInfo)
+{
+#ifdef HAVE_VUID_WHEEL
+ wheel_state wstate;
+ int nwheel = -1;
+
+ wstate.vers = VUID_WHEEL_STATE_VERS;
+ wstate.id = 0;
+ wstate.stateflags = -1;
+
+ if (ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel) != 0)
+ return (0);
+
+ if (ioctl(pInfo->fd, VUIDGWHEELSTATE, &wstate) != 0) {
+ xf86Msg(X_WARNING, "%s: couldn't get wheel state\n", pInfo->name);
+ return (0);
+ }
+
+ wstate.stateflags |= VUID_WHEEL_STATE_ENABLED;
+
+ if (ioctl(pInfo->fd, VUIDSWHEELSTATE, &wstate) != 0) {
+ xf86Msg(X_WARNING, "%s: couldn't enable wheel\n", pInfo->name);
+ return (0);
+ }
+
+ return (1);
+#else
+ return (0);
+#endif
+}
+
+
/* This function is called when the protocol is "VUID". */
static Bool
vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
{
MouseDevPtr pMse = pInfo->private;
VuidMsePtr pVuidMse;
+ int buttons;
pVuidMse = xalloc(sizeof(VuidMseRec));
if (pVuidMse == NULL) {
@@ -84,7 +172,40 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
return FALSE;
}
}
+
pVuidMse->buffer = (unsigned char *)&pVuidMse->event;
+
+ pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL);
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_ERROR,
+ "%s: cannot push module '%s' onto mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+ xfree(pVuidMse);
+ xfree(pMse);
+ return FALSE;
+ }
+
+ buttons = xf86SetIntOption(pInfo->options, "Buttons", 0);
+ if (buttons == 0) {
+ if(ioctl(pInfo->fd, MSIOBUTTONS, &buttons) == 0) {
+ pInfo->conf_idev->commonOptions =
+ xf86ReplaceIntOption(pInfo->conf_idev->commonOptions,
+ "Buttons", buttons);
+ xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n",
+ pInfo->name, buttons);
+ }
+ }
+
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_POP, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_WARNING,
+ "%s: cannot pop module '%s' off mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ }
+
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
@@ -112,6 +233,7 @@ vuidReadInput(InputInfoPtr pInfo)
unsigned int n;
int c;
unsigned char *pBuf;
+ int wmask;
pMse = pInfo->private;
pVuidMse = pMse->mousePriv;
@@ -154,7 +276,15 @@ vuidReadInput(InputInfoPtr pInfo)
dy -= delta;
break;
}
+ }
+#ifdef HAVE_VUID_WHEEL
+ else if (vuid_in_range(VUID_WHEEL, pVuidMse->event.id)) {
+ if (vuid_id_offset(pVuidMse->event.id) == 0)
+ dz -= VUID_WHEEL_GETDELTA(pVuidMse->event.value);
+ else
+ dw -= VUID_WHEEL_GETDELTA(pVuidMse->event.value);
}
+#endif
n = 0;
if ((c = XisbRead(pMse->buffer)) >= 0) {
@@ -219,9 +349,20 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
pInfo->fd = -1;
} else {
int fmt = VUID_FIRM_EVENT;
- ioctl(pInfo->fd, VUIDSFORMAT, &fmt);
- xf86FlushInput(pInfo->fd);
- AddEnabledDevice(pInfo->fd);
+
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_ERROR,
+ "%s: cannot push module '%s' onto mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+ } else {
+ ioctl(pInfo->fd, VUIDSFORMAT, &fmt);
+ vuidMouseWheelInit(pInfo);
+ xf86FlushInput(pInfo->fd);
+ AddEnabledDevice(pInfo->fd);
+ }
}
}
pMse->lastButtons = 0;
@@ -237,6 +378,12 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
XisbFree(pMse->buffer);
pMse->buffer = NULL;
}
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_POP, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_WARNING,
+ "%s: cannot pop module '%s' off mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ }
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
}
@@ -278,21 +425,98 @@ CheckProtocol(const char *protocol)
static const char *
DefaultProtocol(void)
{
- return "VUID";
+ return "Auto";
+}
+
+static Bool
+solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
+ const char **device)
+{
+ const char **pdev, **pproto, *dev = NULL;
+ int fd = -1;
+ Bool found;
+
+ for (pdev = solarisMouseDevs; *pdev; pdev += 2) {
+ pproto = pdev + 1;
+ if ((*protocol != NULL) && (strcmp(*protocol, "Auto") != 0) &&
+ (*pproto != NULL) && (strcmp(*pproto, *protocol) != 0)) {
+ continue;
+ }
+ if ((*device != NULL) && (strcmp(*device, *pdev) != 0)) {
+ continue;
+ }
+ SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
+ if (fd == -1) {
+#ifdef DEBUG
+ ErrorF("Cannot open %s (%s)\n", pdev, strerror(errno));
+#endif
+ } else {
+ found = TRUE;
+ if ((*pproto != NULL) && (strcmp(*pproto, "VUID") == 0)) {
+ int i;
+ if (ioctl(fd, VUIDGFORMAT, &i) < 0) {
+ found = FALSE;
+ }
+ }
+ close(fd);
+ if (found == TRUE) {
+ if (*pproto != NULL) {
+ *protocol = *pproto;
+ }
+ *device = *pdev;
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
}
static const char *
SetupAuto(InputInfoPtr pInfo, int *protoPara)
{
- return DefaultProtocol();
+ const char *pdev = NULL;
+ const char *pproto = NULL;
+ MouseDevPtr pMse = pInfo->private;
+
+ if (pInfo->fd == -1) {
+ /* probe to find device/protocol to use */
+ if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, pdev);
+ }
+ } else if (pMse->protocolID == PROT_AUTO) {
+ pdev = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
+ "Device", NULL);
+ solarisMouseAutoProbe(pInfo, &pproto, &pdev);
+ }
+ return pproto;
+}
+
+static const char *
+FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+ const char *pdev = NULL;
+ const char *pproto = protocol;
+
+ if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, pdev);
+ }
+ return pdev;
}
-#else /* __SOL8__ || !i386 */
+#else /* __SOL8__ || !__i386 */
#undef MSE_MISC
#define MSE_MISC 0
-#endif /* !__SOL8__ && i386 */
+#endif /* !__SOL8__ && __i386 */
static int
SupportedInterfaces(void)
@@ -310,12 +534,13 @@ xf86OSMouseInit(int flags)
if (!p)
return NULL;
p->SupportedInterfaces = SupportedInterfaces;
-#if defined(__SOL8__) || !defined(i386)
+#if defined(__SOL8__) || !defined(__i386)
p->BuiltinNames = BuiltinNames;
p->CheckProtocol = CheckProtocol;
p->PreInit = sunMousePreInit;
p->DefaultProtocol = DefaultProtocol;
p->SetupAuto = SetupAuto;
+ p->FindDevice = FindDevice;
#endif
return p;
}
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 2f4b84e99..02883f054 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_vid.c,v 1.3 2002/10/03 02:04:19 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_vid.c,v 1.2 2001/10/28 03:34:03 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
diff --git a/hw/xfree86/os-support/sysv/sysv_init.c b/hw/xfree86/os-support/sysv/sysv_init.c
index 1e9166712..d8dea0f16 100644
--- a/hw/xfree86/os-support/sysv/sysv_init.c
+++ b/hw/xfree86/os-support/sysv/sysv_init.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_init.c,v 3.5 1998/07/25 16:57:08 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_init.c,v 3.4.4.3 1998/07/18 17:53:57 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
diff --git a/hw/xfree86/os-support/sysv/sysv_io.c b/hw/xfree86/os-support/sysv/sysv_io.c
index d48efd76e..c110f452e 100644
--- a/hw/xfree86/os-support/sysv/sysv_io.c
+++ b/hw/xfree86/os-support/sysv/sysv_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_io.c,v 3.11 2003/02/17 15:12:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_io.c,v 3.10 2002/10/11 01:40:37 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Dawes <dawes@xfree86.org>
diff --git a/hw/xfree86/os-support/sysv/sysv_video.c b/hw/xfree86/os-support/sysv/sysv_video.c
index c0460f524..2f7e4e723 100644
--- a/hw/xfree86/os-support/sysv/sysv_video.c
+++ b/hw/xfree86/os-support/sysv/sysv_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_video.c,v 3.21 2003/03/14 13:46:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_video.c,v 3.20tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
diff --git a/hw/xfree86/os-support/sysv/xqueue.c b/hw/xfree86/os-support/sysv/xqueue.c
index 0478ee65e..b8d8a9086 100644
--- a/hw/xfree86/os-support/sysv/xqueue.c
+++ b/hw/xfree86/os-support/sysv/xqueue.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/xqueue.c,v 3.20 2001/03/06 18:20:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/xqueue.c,v 3.19 2000/02/10 22:33:45 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993-1999 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/os-support/sysv/xqueue.h b/hw/xfree86/os-support/sysv/xqueue.h
index 2085a3e70..45df28275 100644
--- a/hw/xfree86/os-support/sysv/xqueue.h
+++ b/hw/xfree86/os-support/sysv/xqueue.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/xqueue.h,v 1.1 1999/05/22 08:40:18 dawes Exp $ */
+/* $XFree86$ */
#ifndef _XF86_XQUEUE_H_
#define _XF86_XQUEUE_H_
diff --git a/hw/xfree86/os-support/xf86OSKbd.h b/hw/xfree86/os-support/xf86OSKbd.h
index 1b5124a55..344f7e901 100644
--- a/hw/xfree86/os-support/xf86OSKbd.h
+++ b/hw/xfree86/os-support/xf86OSKbd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.5 2003/08/24 19:58:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.5tsi Exp $ */
/*
* Copyright (c) 2002-2003 by The XFree86 Project, Inc.
*
@@ -104,7 +104,7 @@ typedef enum {
PROT_XQUEUE,
PROT_WSCONS,
PROT_USB,
- PROT_UNKNOWN
+ PROT_UNKNOWN_KBD
} KbdProtocolId;
typedef struct {
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 8b50c793a..b73270236 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -125,6 +125,7 @@ extern void xf86WrapperInit(void);
#define xf86FatalError(a, b) \
if (dispatchException & DE_TERMINATE) { \
ErrorF(a, b); \
+ ErrorF("\n"); \
return; \
} else FatalError(a, b)
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
index 86a9b4179..733a5543d 100644
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ b/hw/xfree86/os-support/xf86_ansic.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.51 2003/08/24 17:37:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.53 2003/10/28 18:36:37 tsi Exp $ */
/*
* Copyright 1997-2003 by The XFree86 Project, Inc
*
@@ -239,6 +239,8 @@ extern int xf86strcasecmp(const char*,const char*);
extern char* xf86strcpy(char*,const char*);
extern xf86size_t xf86strcspn(const char*,const char*);
extern char* xf86strerror(int);
+extern xf86size_t xf86strlcat(char*,const char*,xf86size_t);
+extern xf86size_t xf86strlcpy(char*,const char*,xf86size_t);
extern xf86size_t xf86strlen(const char*);
extern char* xf86strncat(char *, const char *, xf86size_t);
extern int xf86strncmp(const char*,const char*,xf86size_t);
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
index 1ac0b3930..6eb4573f4 100644
--- a/hw/xfree86/os-support/xf86_libc.h
+++ b/hw/xfree86/os-support/xf86_libc.h
@@ -1,4 +1,5 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.57 2003/08/24 17:37:03 dawes Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.1.4.2 2003/12/06 13:24:26 kaleb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.63 2003/12/08 21:46:55 alanh Exp $ */
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
@@ -96,7 +97,11 @@ struct xf86stat {
typedef int xf86key_t;
/* setjmp/longjmp */
+#if defined(__ia64__)
+typedef int xf86jmp_buf[1024] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+#else
typedef int xf86jmp_buf[1024];
+#endif
/* for setvbuf */
#define XF86_IONBF 1
@@ -373,6 +378,10 @@ typedef int xf86jmp_buf[1024];
#define strcspn(ccp1,ccp2) xf86strcspn(ccp1,ccp2)
#undef strerror
#define strerror(i) xf86strerror(i)
+#undef strlcat
+#define strlcat(cp,ccp,I) xf86strlcat(cp,ccp,I)
+#undef strlcpy
+#define strlcpy(cp,ccp,I) xf86strlcpy(cp,ccp,I)
#undef strlen
#define strlen(ccp) xf86strlen(ccp)
#undef strncmp
@@ -410,11 +419,11 @@ typedef int xf86jmp_buf[1024];
#undef ungetc
#define ungetc(i,FP) xf86ungetc(i,FP)
#undef vfprinf
-#define vfprintf xf86vfprintf
+#define vfprintf(p,f,a) xf86vfprintf(p,f,a)
#undef vsnprintf
-#define vsnprintf xf86vsnprintf
+#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a)
#undef vsprintf
-#define vsprintf xf86vsprintf
+#define vsprintf(s,f,a) xf86vsprintf(s,f,a)
/* XXX Disable assert as if NDEBUG was defined */
/* Some X headers defined this away too */
#undef assert