Re: Current tinderbox regression (libtrans)
Alan Coopersmith wrote: I don't see any errors or problems there in my builds, but perhaps there's a difference between the Solaris Linux headers that causes this issue. I did have to move the X11/Xos_r.h to before that function to correct errors that I did hit in the Solaris builds, which I did in commit cca91ddaa... Are the socket structure defines not included by that point on Linux? (It seems to be compaining about struct sockaddr_un.) I've gone ahead and applied your revert patch, since Paolo's patch causes problems on my Solaris builds (it makes trans_mkdir static in Xtranssock.c, but it's used in Xtranslocal.c which is included before Xtranssock.c). Can you post the Solaris log of build error please? Btw lots of pepole prefer to say Paolo instead of Paulo, does my name sound wrong or funny in other languages? :-) The problem in Linux is indeed deferencing sockaddr_un fields without definition of that structure. is_numeric() and trans_mkdir() are static functions, and believe it or not, declared as such in Xtransint.h, but then there are other static definitions in Xtransint.h... But those functions are used in Xtranssock.c and Xtransutil.c, and given that those two files are included from transport.c, and the functions are close to trivial, I am having trouble understanding why moving the function definitions to before they are first used would cause any error on Solaris, as with my patch, build goes fine in Linux, without warnings. libxtrans probably should consist of just transport.c and Xtransint.h, IMO, and add the proper #ifdef's around data/functions defined there. libxtrans currently is something way too fragile... Nevertheless, thanks for applying the patch, as now one can build everything again without needing to fix libxtrans first. Well, almost everything as there are still a lot of uncompilable packages, ironybut they are least interesting packages, like xf86-input-keyboard/irony. -Alan Coopersmith- alan.coopersm...@sun.com Sun Microsystems, Inc. - X Window System Engineering Chris Ball wrote: http://tinderbox.x.org/builds/2009-02-07-0001/logs/libICE/#build In file included from /home/cjb/xorg-build/include/X11/Xtrans/transport.c:62, from icetrans.c:31: /home/cjb/xorg-build/include/X11/Xtrans/Xtransutil.c: In function '_IceTransGetMyNetworkId': /home/cjb/xorg-build/include/X11/Xtrans/Xtransutil.c:258: error: dereferencing pointer to incomplete type /home/cjb/xorg-build/include/X11/Xtrans/Xtransutil.c:261: error: dereferencing pointer to incomplete type (Would people prefer that I send these to xorg-devel@ instead? They have a possibly useful function to readers of xorg@, as they signify when not to bother trying to build HEAD, but I'm fine with either one.) - Chris. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Revert Fix XXX declared 'static' but not defined
Benjamin Close wrote: I don't see anything wrong as it reverts to a version known to work, but from a quick test, without rebuilding everything, just libICE and libFS, it should be enough to move the definition of is_numeric and trans_mkdir to the start of Xtranssock.c (the revert in transport.c is required), as the weird prototypes should have been to have those functions static, and not have a compilation errors due to calling them (implicit extern declaration) before definition. I am attaching an alternate patch. It should be fully functional, unless some code elsewhere is doing something really weird to have only Xtransutil.c included, but not Xtranssock.c. But % grep -rn Xtransutil.c xorg/lib xorg/xserver xorg/app tells me the only thing that includes Xtransutil.c is xorg/libxtrans/transport.c. This reverts commit d192bac409fe5ef99fa9fb9b5a0d5f656f0f1412. When transport.c is directly include (as in the case of libICE:icetrans.c:32) Xtranssock.c must be included before Xtransutil.c in order for the socket structures to be included. Including Xtransutil.c after Xtranssock.c requires is_number and trans_mkdir to be defined. This reintroduces the warning until a cleaner solution can be found but fixes the build. Found by: Tinderbox Signed-off-by: Benjamin Close benjamin.cl...@clearchain.com --- Xtransint.h | 12 transport.c |2 +- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Xtransint.h b/Xtransint.h index e1a95a2..623cdef 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -345,6 +345,18 @@ static int TRANS(WriteV)( #endif /* CRAY || WIN32 || __sxg__ */ + +static int is_numeric ( +char * /* str */ +); + +#ifdef TRANS_SERVER +static int trans_mkdir ( +char *, /* path */ +int /* mode */ +); +#endif + /* * Some XTRANSDEBUG stuff */ diff --git a/transport.c b/transport.c index baf5bfd..5131d99 100644 --- a/transport.c +++ b/transport.c @@ -59,7 +59,6 @@ from The Open Group. #endif #include Xtransint.h -#include Xtransutil.c #ifdef LOCALCONN #include Xtranslcl.c @@ -71,3 +70,4 @@ from The Open Group. #include Xtranstli.c #endif #include Xtrans.c +#include Xtransutil.c -- 1.6.0.6 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg binCdnwyOPpzf.bin Description: Binary data ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/driver/xf86-video-ast: [PATCH 1/2] Janitor: make distcheck, .gitignore.
Dan Nicholson wrote: I think I reviewed all the non-code patches and they looked fine except for a couple I replied on. Most of the warning fixes seemed fine to me, too, but I'd be lying if I said I was the master of the C specification or knowing the xserver SDK. Thanks, So, I think you could push all the distcheck-type fixes. Especially for the unused drivers. One thing that would be nice is if you could inline the patches. That would make reviewing faster. Below is my git send-email cheat sheet if that helps. You can always play around with --dry-run and see if the right thing is being produced. I experimented a bit with git send-email (and git imap-send and git request-pull as suggested in irc) before starting sending any new patches. But I preferred, at least for the moment to attach them so that it should work properly in any MUA, and make it easier to edit the subject to add repository information. ~/.gitconfig settings [sendemail] bcc = dbn.li...@gmail.com chainreplyto = false smtpserver = smtp.gmail.com smtpssl = true smtpuser = dbn.li...@gmail.com suppresscc = self #signedoffcc = false #suppressfrom = true Single patch: (add --no-thread to skip prompt for Message-ID): git format-patch -s HEAD^ git send-email --to $list 0001-*.patch Patch series from branch: git format-patch -n -s -o $patchdir --cover-letter master $EDITOR $patchdir/-cover-letter.patch git send-email --to $list $patchdir The problem is that it makes it too hard to fetch the verbatim, entire message if not using some specific MUAs. I talked to jcristau (after the problem where I did a cutpaste of the announce message for libXext, and the webmail interface was smart enough to wrap lines so that the pgp verification would fail) that I considered to make xmh an usable MUA, why not? But I don't think I would do it..., too much time and dedication required, and I think I already invested enough of my free time in Xaw and xedit in the past :-) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Janitor/RFC: Xorg packages
Some points that could be made better: 1. Get rid of configure options that should not be used, and are only useful for make distcheck. I think it may be one case where AC_SUBST() can have an important role in the proper solution? 2. Replace most gratuitous AC_SUBST(VAR) by usage of $(VAR) in the Makefile.am's. It not only allows using %make VAR=someval, but also has the benefit of a cleaner configure.ac. 3. In video drivers configure.ac's, there is a lot of tests in the format: save_FOOFLAGS=$FOOFLAGS AC_CHECK_DECL(SOME_DEFINE, SOME_DEFINE=yes, SOME_DEFINE=no, [#include xorg-server.h]) some-shell-code FOOFLAGS=$save_FOOFLAGS Maybe, xorg-macros should be extended, to have proper: XORG_LIBPCIACCESS XORG_XF1OR4BPP XORG_HASISA XORG_DRMSTUFF macros, and similar? To avoid too much cutpaste, and slightly different variants for every driver. 4. Have a global autogen.sh, provided by what? xorg-macros? Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
driver/xf86-input-mutouch: [PATCH] Janitor: make distcheck, .gitignore.
Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Replace ChangeLog with automatically generated version, this is also the make distcheck correction. Don't add $CWARNFLAGS to $XORG_FLAGS, as suggested by Dan Nicholson, so one could write: % make CWARNFLAGS='-Werror' or the like. From d4821fce714d9cab4f707b265eb3562dac875794 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 14:37:48 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |6 ++ ChangeLog | 45 - Makefile.am |9 + configure.ac| 16 +--- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 7 files changed, 26 insertions(+), 60 deletions(-) delete mode 100644 ChangeLog delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index 2df4a8d..db180c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,3 +20,7 @@ ltmain.sh missing stamp-h1 *~ +*.4 +xf86-input-mutouch-*.tar.* +ChangeLog +tags diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 5f44eb5..000 --- a/ChangeLog +++ /dev/null @@ -1,45 +0,0 @@ -2006-04-06 Adam Jackson a...@freedesktop.org - - * configure.ac: - * src/xf86MuTouch.c: - Unlibcwrap. Bump server version requirement. Bump to 1.1.0. - -2005-12-20 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin kem-at-freedesktop-dot-org - - * man/Makefile.am: - Change *man_SOURCES == *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-29 Adam Jackson a...@freedesktop.org - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC2 release. - -2005-11-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. diff --git a/Makefile.am b/Makefile.am index 7052905..6a0325e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index f4befa1..8d45aec 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=mutouch -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=mutouch +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 5ddc0b7..d2c19ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version
Re: xorg/driver/xf86-input-jamstudio: [PATCH] Janitor: make distcheck, .gitignore.
Tiago Vignatti wrote: The gratuitous move of the lines DRIVER_NAME=foo AC_SUBST([DRIVER_NAME]) is to better match the pattern used in video drivers. But maybe it would be better to either actually try to use a solution that makes use of the pattern @driver_n...@_foo = bar and use a single Makefile.am for all drivers, like it would be a good idea to have a single autogen.sh for all modules. looking at the git log, jamstudio is dead and I'd rather bury it than put janitor patches in. It makes it look like the driver actually matters. we cannot simply put these dead drivers/libs/etc in some cgit limbo directory well hidden from the mortal humans? Just to organize a little bit the things. I wonder if anybody has tested these drivers for a long time. Still they are packaged and distributed by most distros. So, either they are working, or people that use this hardware is stuck with some old distro or custom setup. But while the repositories exist, the minimum that could be done is to have it consistent, and buildable. Well, and new hardware apparently is having a tough time to keep track of the speed input api/abi changes :-) (But this is talking about one vendor only, and it's binary drivers still only for X Server 1.4). Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-palmax: [PATCH] Janitor: make distcheck, .gitignore.
From bd89831ba1f003c9f6bdaf3c2481e11885e7a646 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 15:03:20 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Replace ChangeLog with automatically generated version, this is also the make distcheck correction. Don't add $CWARNFLAGS to $XORG_FLAGS, as suggested by Dan Nicholson, so one could write: % make CWARNFLAGS='-Werror' or the like. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |6 ++ ChangeLog | 45 - Makefile.am |9 + configure.ac| 16 +--- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 7 files changed, 26 insertions(+), 60 deletions(-) delete mode 100644 ChangeLog delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index 2df4a8d..41867b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,3 +20,7 @@ ltmain.sh missing stamp-h1 *~ +*.4 +xf86-input-palmax-*.tar.* +ChangeLog +tags diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index af375d7..000 --- a/ChangeLog +++ /dev/null @@ -1,45 +0,0 @@ -2006-04-06 Adam Jackson a...@freedesktop.org - - * configure.ac: - * src/xf86Palmax.c: - Unlibcwrap. Bump server version requirement. Bump to 1.1.0. - -2005-12-20 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin kem-at-freedesktop-dot-org - - * man/Makefile.am: - Change *man_SOURCES == *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-29 Adam Jackson a...@freedesktop.org - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC2 release. - -2005-11-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. diff --git a/Makefile.am b/Makefile.am index 7052905..6a0325e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index e467402..4b80bdb 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=palmax -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=palmax +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 703d42f..70043a1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir
driver/xf86-input-penmount: [PATCH] Janitor: make distcheck, compile warnings, .gitignore.
From b4a05a860087f1aea5bc64390ea23e17654e48c3 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 15:11:04 -0200 Subject: [PATCH] Janitor: make distcheck, compile warnings, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Use XORG_CHANGELOG to correct make distcheck. Don't add $CWARNFLAGS to $XORG_FLAGS, as suggested by Dan Nicholson, so one could write: % make CWARNFLAGS='-Werror' or the like. Remove an unused variable. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |4 Makefile.am |6 -- configure.ac| 16 +--- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ src/xf86PM.c|2 -- 7 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index 04b9542..03de1d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs ChangeLog Makefile Makefile.in @@ -20,3 +22,5 @@ missing stamp-h1 *~ man/penmount.? +xf86-input-penmount-*.tar.* +tags diff --git a/Makefile.am b/Makefile.am index 42f8b54..dde2381 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,9 +22,11 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man CLEANFILES = ChangeLog -EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index b245f5f..1af9fb6 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=penmount -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=penmount +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 2042e32..eb71a94 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ diff --git a/src/xf86PM.c b/src/xf86PM.c index 95adb8b..e20b327 100644 --- a/src/xf86PM.c +++ b/src/xf86PM.c @@ -462,8 +462,6 @@ DeviceControl (DeviceIntPtr dev, int mode) { InputInfoPtr pInfo = dev-public.devicePrivate; PenMountPrivatePtr priv = (PenMountPrivatePtr) (pInfo-private); - unsigned char map[] = - {0, 1}; switch (mode) { -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-spaceorb: Janitor: make distcheck, .gitignore.
From 729b45b0a1ac4ef6a5f92549c8148b7ee7a6fa4a Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 15:18:32 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Use XORG_CHANGELOG macro to correct make distcheck. Don't add $CWARNFLAGS to $XORG_FLAGS, as suggested by Dan Nicholson, so one could write: % make CWARNFLAGS='-Werror' or the like. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |4 Makefile.am |6 -- configure.ac| 16 +--- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 6 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index d90176e..1f2660c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs ChangeLog Makefile Makefile.in @@ -19,3 +21,5 @@ ltmain.sh missing stamp-h1 *~ +xf86-input-spaceorb-*.tar.* +tags diff --git a/Makefile.am b/Makefile.am index 42f8b54..dde2381 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,9 +22,11 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man CLEANFILES = ChangeLog -EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index d175c65..001fd8b 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=spaceorb -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=spaceorb +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 5ff68eb..a101dc7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Fix cast int-to-pointer and pointer-to-int
Simon Thum wrote: Tomas Carnecky wrote: By first casting to long and then to the final type. Of course this assumes that sizeof(long) == sizeof(void *). If the Win32 Forgive my stupidity, but isn't it a C language rule that sizeof(long) == sizeof(void *) is always true? This of course may have special handling inside the kernel as one may be using a 32 bit cpu with more then 4GB of RAM, or just file offsets... In Xorg, afaik this is only an issue for physical addresses, but I don't know if there may be problems when mapping a physical address above 4GB to a 32 bits virtual address. On this page: http://www.viva64.com/content/articles/64-bit-development/?f=20_issues_of_porting_C++_code_on_the_64-bit_platform.htmllang=encontent=64-bit-development#IDALZBTD It appears to be only showing that when sizeof(int) != sizeof(long) you may have trouble addressing arrays larger then 4GB :-) they explain that indeed there are memory models where this doesn't hold. +1 for uintptr_t folks care enough about warnings, we could make macros for this. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-synaptics: [PATCH 1/2] Janitor: make distcheck, pkg-config, .gitignore.
From ab4cce1b7672a67c922a4ac881fc3d60fb552345 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 15:55:40 -0200 Subject: [PATCH 1/2] Janitor: make distcheck, pkg-config, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Replace ChangeLog with automatically generated version, this is also one of the make distcheck corrections. Use XORG_CWARNFLAGS macro. Update .gitignore for files left after make distcheck. This uses the same solution suggested for evdev and joystick to correct the issue with pkg-config variables that specify a directory, but break make distcheck. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore|4 ChangeLog | 21 - Makefile.am | 10 ++ configure.ac | 20 +--- src/Makefile.am |2 ++ tools/Makefile.am |1 + 6 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 ChangeLog diff --git a/.gitignore b/.gitignore index 1aaf548..ad70b8e 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ synclient syndaemon *.[0-9] *.pc +*~ +xf86-input-synaptics-*.tar.* +ChangeLog +tags diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 9e39ed4..000 --- a/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ -2008-07-08 Christoph Brill egore...@egore911.de - - * ChangeLog: testing the official hosting at freedesktop.org - -2008-06-06 Christoph Brill egore...@egore911.de - - * src/freebsd_mouse.h, src/linux_input.h: drop and use installed - system headers - * src/alpscomm.c, src/eventcomm.c, src/ps2comm.c, src/psmcomm.c, - src/psmcomm.h, src/synaptics.c, src/synclient.c, src/syndaemon.c: Add - config.h - * src/eventcomm.c, src/eventcomm.h: Only build on Linux - * src/psmcomm.c, src/psmcomm.h: Only build on *BSD - * src/synaptics.c, src/synclient.c: Make it build on the new build - system - * src/synaptics.c: Fix build against latest git by replacing all the - xf86_ansi.h functions by the native ones - -2008-06-06 Christoph Brill egore...@egore911.de - - * src/*.c, src/*.h: move files to a directory diff --git a/Makefile.am b/Makefile.am index ad69d2a..bb749de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,8 +19,18 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTOMAKE_OPTIONS = foreign +DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg SUBDIRS = include src man tools fdi pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-synaptics.pc +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index d2aea91..532fc84 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=synaptics -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -103,12 +104,13 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +xorg_sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` +AC_ARG_WITH(sdkdir, + AC_HELP_STRING([--with-sdkdir=path], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir=$withval], [sdkdir=${xorg_sdkdir}]) AC_SUBST([sdkdir]) -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) - # Checks for libraries. PKG_CHECK_MODULES(XLIB, x11) # needed for syndaemon PKG_CHECK_MODULES(XRECORD, xtst, AC_DEFINE([HAVE_XRECORD],[],[Use XRecord]), true) @@ -116,8 +118,12 @@ PKG_CHECK_MODULES(XRECORD, xtst, AC_DEFINE([HAVE_XRECORD],[],[Use XRecord]), tru # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=synaptics +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index fc7d20a..d7eb08d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ diff --git a/tools/Makefile.am b/tools/Makefile.am index 2f2199b..46c46ea 100644 --- a/tools/Makefile.am +++
xorg/driver/xf86-input-synaptics: [PATCH 2/2] Janitor: compile warnings and missing symbols.
From 1684a85f624b38856f51608976e5711462370770 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 16:13:13 -0200 Subject: [PATCH 2/2] Janitor: compile warnings and missing symbols. The compile warnings are generated by both, gcc and sparse. The missing symbols are just libm symbols that the driver will inherit from the X Server. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- src/Makefile.am|1 + src/properties.c | 69 ++- src/synaptics.c|8 +- src/synapticsstr.h |6 tools/synclient.c |4 +- tools/syndaemon.c |6 ++-- 6 files changed, 48 insertions(+), 46 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d7eb08d..8c9ef37 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,6 +28,7 @@ AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version +...@driver_name@_drv_la_LIBADD = -lm @driver_n...@_drv_ladir = @inputdir@ INCLUDES=-I$(top_srcdir)/include/ diff --git a/src/properties.c b/src/properties.c index 8b8334d..77919c9 100644 --- a/src/properties.c +++ b/src/properties.c @@ -44,40 +44,40 @@ #endif static Atom float_type; -Atom prop_edges = 0; -Atom prop_finger= 0; -Atom prop_tap_time = 0; -Atom prop_tap_move = 0; -Atom prop_tap_durations = 0; -Atom prop_tap_fast = 0; -Atom prop_middle_timeout= 0; -Atom prop_twofinger_pressure= 0; -Atom prop_scrolldist= 0; -Atom prop_scrolledge= 0; -Atom prop_scrolltwofinger = 0; -Atom prop_speed = 0; -Atom prop_edgemotion_pressure = 0; -Atom prop_edgemotion_speed = 0; -Atom prop_edgemotion_always = 0; -Atom prop_buttonscroll = 0; -Atom prop_buttonscroll_repeat = 0; -Atom prop_buttonscroll_time = 0; -Atom prop_off = 0; -Atom prop_guestmouse= 0; -Atom prop_lockdrags = 0; -Atom prop_lockdrags_time= 0; -Atom prop_tapaction = 0; -Atom prop_clickaction = 0; -Atom prop_circscroll= 0; -Atom prop_circscroll_dist = 0; -Atom prop_circscroll_trigger= 0; -Atom prop_circpad = 0; -Atom prop_palm = 0; -Atom prop_palm_dim = 0; -Atom prop_coastspeed= 0; -Atom prop_pressuremotion= 0; -Atom prop_pressuremotion_factor = 0; -Atom prop_grab = 0; +static Atom prop_edges = 0; +static Atom prop_finger= 0; +static Atom prop_tap_time = 0; +static Atom prop_tap_move = 0; +static Atom prop_tap_durations = 0; +static Atom prop_tap_fast = 0; +static Atom prop_middle_timeout= 0; +static Atom prop_twofinger_pressure= 0; +static Atom prop_scrolldist= 0; +static Atom prop_scrolledge= 0; +static Atom prop_scrolltwofinger = 0; +static Atom prop_speed = 0; +static Atom prop_edgemotion_pressure = 0; +static Atom prop_edgemotion_speed = 0; +static Atom prop_edgemotion_always = 0; +static Atom prop_buttonscroll = 0; +static Atom prop_buttonscroll_repeat = 0; +static Atom prop_buttonscroll_time = 0; +static Atom prop_off = 0; +static Atom prop_guestmouse= 0; +static Atom prop_lockdrags = 0; +static Atom prop_lockdrags_time= 0; +static Atom prop_tapaction = 0; +static Atom prop_clickaction = 0; +static Atom prop_circscroll= 0; +static Atom prop_circscroll_dist = 0; +static Atom prop_circscroll_trigger= 0; +static Atom prop_circpad = 0; +static Atom prop_palm = 0; +static Atom prop_palm_dim = 0; +static Atom prop_coastspeed= 0; +static Atom prop_pressuremotion= 0; +static Atom prop_pressuremotion_factor = 0; +static Atom prop_grab = 0; static Atom InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values) @@ -105,6 +105,7 @@ InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values) case 8: converted = val_8; break; case 16: converted = val_16; break; case 32: converted = val_32; break; + default: return None; } atom = MakeAtom(name, strlen(name), TRUE); diff --git a/src/synaptics.c b/src/synaptics.c index 664d2fa..2dd9d81 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -124,12 +124,6 @@ static Bool DeviceClose(DeviceIntPtr); static Bool QueryHardware(LocalDevicePtr); static void ReadDevDimensions(LocalDevicePtr); -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 3 -void InitDeviceProperties(LocalDevicePtr local); -int SetProperty(DeviceIntPtr dev, Atom property,
Re: [PATCH] Fix cast int-to-pointer and pointer-to-int
Julien Cristau wrote: On Thu, 2009-02-05 at 16:16 -0200, Paulo César Pereira de Andrade wrote: Forgive my stupidity, but isn't it a C language rule that sizeof(long) == sizeof(void *) is always true? No. As said earlier in this thread there are IL32P64 systems. Thanks, I will not reply again after reading the entire thread :-) (bad isp for me, my dsl at home worked only like 30 minutes the two last two nights, and I have a lot of email to read now...) Cheers, Julien Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-tek4957: [PATCH] Janitor: make distcheck, .gitignore.
From dace9ea68b7747a4a7f614665500ea9bf3adff13 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 16:43:22 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Replace ChangeLog with automatically generated version, this is also the make distcheck correction. Use XORG_CWARNFLAGS macro to help in detecting driver problems. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |6 ++ ChangeLog | 45 - Makefile.am |9 + configure.ac| 16 +--- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 7 files changed, 26 insertions(+), 60 deletions(-) delete mode 100644 ChangeLog delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index 2df4a8d..c67ee37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,3 +20,7 @@ ltmain.sh missing stamp-h1 *~ +*.4 +xf86-input-tek4957-*.tar.* +ChangeLog +tags diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 5d5d60f..000 --- a/ChangeLog +++ /dev/null @@ -1,45 +0,0 @@ -2006-04-06 Adam Jackson a...@freedesktop.org - - * configure.ac: - * src/xf86Tek4957.c: - Unlibcwrap. Bump server version requirement. Bump to 1.1.0. - -2005-12-20 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin kem-at-freedesktop-dot-org - - * man/Makefile.am: - Change *man_SOURCES == *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-29 Adam Jackson a...@freedesktop.org - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC2 release. - -2005-11-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. diff --git a/Makefile.am b/Makefile.am index 7052905..05e7bc9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES=ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index efe95a4..cc9c86b 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=tek4957 -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=tek4957 +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 86f3728..e730afd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1
xorg/driver/xf86-input-void: [PATCH 1/2] Janitor: update for ABI_XINPUT_VERSION = 5
From fafd4f546bf75e71ce92feaa52d50699fae81a21 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 17:30:18 -0200 Subject: [PATCH 1/2] Janitor: update for ABI_XINPUT_VERSION = 5 This driver should be seen as the simplest possible input driver, and somewhat as a skeleton/model for newer ones. Having it at least compiling with current xorg sdk is a plus. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- src/void.c | 17 - 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/void.c b/src/void.c index a5a47be..5a110f1 100644 --- a/src/void.c +++ b/src/void.c @@ -57,6 +57,7 @@ /** * Function/Macro keys variables */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) 5 static KeySym void_map[] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -130,6 +131,7 @@ static KeySymsRec void_keysyms = { /* map minKeyCode maxKeyCode width */ void_map, 8, 255, 1 }; +#endif /* GET_ABI_MAJOR(ABI_XINPUT_VERSION) 5 */ static const char *DEFAULTS[] = { NULL @@ -172,6 +174,10 @@ xf86VoidControlProc(DeviceIntPtr device, int what) InputInfoPtr pInfo; unsigned char map[MAXBUTTONS + 1]; int i; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 5 +XkbRMLVOSet rmlvo; +#endif +Bool result; pInfo = device-public.devicePrivate; @@ -202,7 +208,16 @@ xf86VoidControlProc(DeviceIntPtr device, int what) return !Success; } */ - if (InitKeyboardDeviceStruct((DevicePtr)device, void_keysyms, NULL, BellProc, KeyControlProc) == FALSE) { + +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 5 + memset(rmlvo, 0, sizeof(XkbRMLVOSet)); + result = InitKeyboardDeviceStruct(device, rmlvo, + BellProc, KeyControlProc); +#else + result = InitKeyboardDeviceStruct((DevicePtr)device, void_keysyms, + NULL, BellProc, KeyControlProc); +#endif + if (result == FALSE) { ErrorF(unable to init keyboard device\n); return !Success; } -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-video-apm: [PATCH 2/2] Janitor: compile warning fixes.
From fb59b563f6a586ee491f437281c7251f8a83d8f5 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 17:56:20 -0200 Subject: [PATCH 2/2] Janitor: compile warning fixes. Correct most warnings generated by gcc and sparse. Remaining warnings are about the APM and apmModuleData symbols that have no declaration. Those symbols are dlsym'ed by the server loader, to find module entry points. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- src/apm_dga.c|2 +- src/apm_driver.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apm_dga.c b/src/apm_dga.c index 313d03b..a947d70 100644 --- a/src/apm_dga.c +++ b/src/apm_dga.c @@ -45,7 +45,7 @@ DGAFunctionRec ApmDGAFuncs = { /* * Placeholder */ -void +static void ApmSync(ScrnInfoPtr pScrn) { } diff --git a/src/apm_driver.c b/src/apm_driver.c index 0166f41..d53a712 100644 --- a/src/apm_driver.c +++ b/src/apm_driver.c @@ -2061,7 +2061,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* must be after visual RGB order fixed */ if (pScrn-bitsPerPixel 4) - fbPictureInit(pScreen, 0, 0); + fbPictureInit(pScreen, NULL, 0); xf86SetBlackWhitePixels(pScreen); -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-video-ark: [PATCH] Janitor: make distcheck, compile warnings, .gitignore.
From 2d63aa335cf3cba4ea462d824019990590e8f17e Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 18:25:05 -0200 Subject: [PATCH] Janitor: make distcheck, compile warnings, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Replace ChangeLog with automatically generated version, this is also the make distcheck correction. Use XORG_CWARNFLAGS to help find possible driver problems. Compile warning was a simple sparse warning of usage of integer where a pointer was expected. Random thought completely out of place: When using 0 instead of (void *)0, a warning should not be generated in the first place, as compilers and humans should be smart enough to understand what is going on in that case. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |5 + ChangeLog| 48 Makefile.am |9 + configure.ac | 12 ++-- src/.gitignore |6 -- src/Makefile.am |2 ++ src/ark_driver.c |2 +- 7 files changed, 23 insertions(+), 61 deletions(-) delete mode 100644 ChangeLog delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index 2df4a8d..48eeff0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,3 +20,6 @@ ltmain.sh missing stamp-h1 *~ +xf86-video-ark-*.tar.* +ChangeLog +tags diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index e41fc6a..000 --- a/ChangeLog +++ /dev/null @@ -1,48 +0,0 @@ -2006-04-06 Adam Jackson a...@freedesktop.org - - * configure.ac: - * src/ark.h: - * src/ark_accel.c: - * src/ark_driver.c: - Unlibcwrap. Bump server version requirement. Bump to 0.6.0. - -2006-02-08 Luc Verhaegen l...@skynet.be - - * src/ark_driver.c: (ARKPreInit): - - Remove wrong usage of pScrn-clock. - -2005-12-20 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-03 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-29 Adam Jackson a...@freedesktop.org - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update package version number for X11R7 RC2 release. - -2005-11-01 Kevin E. Martin kem-at-freedesktop-dot-org - - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. diff --git a/Makefile.am b/Makefile.am index 16f4412..ffefdab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES=ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 5d8ec8b..eccce50 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,9 @@ AC_INIT([xf86-video-ark], xf86-video-ark) AC_CONFIG_SRCDIR([Makefile.am]) +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) AC_CONFIG_AUX_DIR(.) @@ -38,6 +41,7 @@ AM_MAINTAINER_MODE AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -54,12 +58,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -INCLUDES=$XORG_INCS -I${sdkdir} '-I$(top_srcdir)/src -I$(prefix)/include' -AC_SUBST([CFLAGS]) -AC_SUBST([INCLUDES]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. SAVE_CPPFLAGS=$CPPFLAGS @@ -84,6 +83,7 @@ AC_SUBST([DRIVER_NAME]) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([ Makefile diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index a605e6c..2cd15b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(CWARNFLAGS)
xorg/driver/xf86-video-ast: [PATCH 2/2] Janitor: Correct compiler warnings.
From this patch on, I will ignore the generated by default sparse warning: Using plain integer as NULL pointer that is, add -Wno-non-pointer-null to sparse (cgcc) command line. From 3f88e53d1db44b12d15f01c04a539580cb876fc0 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 18:58:13 -0200 Subject: [PATCH 2/2] Janitor: Correct compiler warnings. Most of the warnings were generated by sparse. The symbols DAC_TEXT and DAC_EGA were removed because they are not used anywhere. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- src/ast_accel.c |4 +- src/ast_driver.c | 14 ++-- src/ast_mode.c| 56 src/ast_vgatool.c |6 ++-- 4 files changed, 21 insertions(+), 59 deletions(-) diff --git a/src/ast_accel.c b/src/ast_accel.c index ad954e8..1086184 100644 --- a/src/ast_accel.c +++ b/src/ast_accel.c @@ -58,7 +58,7 @@ #ifdef Accel_2D /* ROP Translation Table */ -int ASTXAACopyROP[16] = +static int ASTXAACopyROP[16] = { ROP_0, /* GXclear */ ROP_DSa, /* GXand */ @@ -78,7 +78,7 @@ int ASTXAACopyROP[16] = ROP_1/* GXset */ }; -int ASTXAAPatternROP[16]= +static int ASTXAAPatternROP[16]= { ROP_0, ROP_DPa, diff --git a/src/ast_driver.c b/src/ast_driver.c index 920987b..2ec2cb2 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -158,7 +158,7 @@ static const OptionInfoRec ASTOptions[] = { {-1, NULL, OPTV_NONE, {0}, FALSE} }; -const char *vgahwSymbols[] = { +static const char *vgahwSymbols[] = { vgaHWFreeHWRec, vgaHWGetHWRec, vgaHWGetIOBase, @@ -176,13 +176,13 @@ const char *vgahwSymbols[] = { NULL }; -const char *fbSymbols[] = { +static const char *fbSymbols[] = { fbPictureInit, fbScreenInit, NULL }; -const char *vbeSymbols[] = { +static const char *vbeSymbols[] = { VBEInit, VBEFreeModeInfo, VBEFreeVBEInfo, @@ -213,13 +213,13 @@ static const char *vbeOptionalSymbols[] = { }; #endif -const char *ddcSymbols[] = { +static const char *ddcSymbols[] = { xf86PrintEDID, xf86SetDDCproperties, NULL }; -const char *int10Symbols[] = { +static const char *int10Symbols[] = { xf86ExecX86int10, xf86InitInt10, xf86Int10AllocPages, @@ -228,7 +228,7 @@ const char *int10Symbols[] = { NULL }; -const char *xaaSymbols[] = { +static const char *xaaSymbols[] = { XAACreateInfoRec, XAADestroyInfoRec, XAAInit, @@ -237,7 +237,7 @@ const char *xaaSymbols[] = { NULL }; -const char *ramdacSymbols[] = { +static const char *ramdacSymbols[] = { xf86CreateCursorInfoRec, xf86DestroyCursorInfoRec, xf86InitCursor, diff --git a/src/ast_mode.c b/src/ast_mode.c index 60cd1fd..ffc7ee0 100644 --- a/src/ast_mode.c +++ b/src/ast_mode.c @@ -56,7 +56,7 @@ /* Driver specific headers */ #include ast.h -VBIOS_STDTABLE_STRUCT StdTable[] = { +static VBIOS_STDTABLE_STRUCT StdTable[] = { /* MD_2_3_400 */ { 0x67, @@ -129,7 +129,7 @@ VBIOS_STDTABLE_STRUCT StdTable[] = { }, }; -VBIOS_ENHTABLE_STRUCT Res640x480Table[] = { +static VBIOS_ENHTABLE_STRUCT Res640x480Table[] = { { 800, 640, 8, 96, 525, 480, 2, 2, VCLK25_175, /* 60Hz */ (SyncNN | HBorder | VBorder | Charx8Dot), 60, 1, 0x2E }, { 832, 640, 16, 40, 520, 480, 1, 3, VCLK31_5, /* 72Hz */ @@ -143,7 +143,7 @@ VBIOS_ENHTABLE_STRUCT Res640x480Table[] = { }; -VBIOS_ENHTABLE_STRUCT Res800x600Table[] = { +static VBIOS_ENHTABLE_STRUCT Res800x600Table[] = { {1024, 800, 24, 72, 625, 600, 1, 2, VCLK36, /* 56Hz */ (SyncPP | Charx8Dot), 56, 1, 0x30 }, {1056, 800, 40, 128, 628, 600, 1, 4, VCLK40, /* 60Hz */ @@ -159,7 +159,7 @@ VBIOS_ENHTABLE_STRUCT Res800x600Table[] = { }; -VBIOS_ENHTABLE_STRUCT Res1024x768Table[] = { +static VBIOS_ENHTABLE_STRUCT Res1024x768Table[] = { {1344, 1024, 24, 136, 806, 768, 3, 6, VCLK65, /* 60Hz */ (SyncNN | Charx8Dot), 60, 1, 0x31 }, {1328, 1024, 24, 136, 806, 768, 3, 6, VCLK75, /* 70Hz */ @@ -172,7 +172,7 @@ VBIOS_ENHTABLE_STRUCT Res1024x768Table[] = { (SyncPP | Charx8Dot), 0xFF, 4, 0x31 }, }; -VBIOS_ENHTABLE_STRUCT Res1280x1024Table[] = { +static VBIOS_ENHTABLE_STRUCT Res1280x1024Table[] = { {1688, 1280, 48, 112, 1066, 1024, 1, 3, VCLK108, /* 60Hz */ (SyncPP | Charx8Dot), 60, 1, 0x32 }, {1688, 1280, 16, 144, 1066, 1024, 1, 3, VCLK135, /* 75Hz */ @@ -183,21 +183,21 @@ VBIOS_ENHTABLE_STRUCT Res1280x1024Table[] = { (SyncPP | Charx8Dot), 0xFF, 3, 0x32 }, }; -VBIOS_ENHTABLE_STRUCT Res1600x1200Table[] = { +static VBIOS_ENHTABLE_STRUCT Res1600x1200Table[] = { {2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162, /* 60Hz */ (SyncPP | Charx8Dot), 60, 1, 0x33 }, {2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162, /* end */ (SyncPP | Charx8Dot),
Re: extension init cleanup
Tomas Carnecky wrote: I tried to clean up the header files that contain declarations for the various extension. Basically, in the end the header include/extinit.h contains the declarations of the extension init functions and declarations of the noXxxExtension booleans, sorted and put under their respective ifdef guards. It's that many patches because I tried to keep each commit as simple as possible, to make it easier to review. It should also be git-bisect friendly, meaning that after each single commit the tree builds. If you would rather see the patches, I can send them to the list as well. But I think I spammed the list enough yesterday so today it's just this cover mail. Hi, I Just looked up superficially, as I curious about the Clean up declarations to make sdksyms.sh happy commit. I did not track in which commit the prototypes were added to extinit.h, but if a symbol there is to be used by other shared objects, you should use extern _X_EXPORT type name(); and not just extern type name(); There is already enough mess in the source tree, so, if you added _X_EXPORT to the function definition, I suggest reconsider :-), as it makes it harder to have automated tools handling this stuff... And the only usages in sources, so far are basically GL and fooModuleData. The problem of adding it to sources is also mainly due to way too much functions declared by macros; Things things like xf86rename.h can easily get out of control. tom The following changes since commit 9a1d07ecb74b7c3267a6910af66ada917a525110: Tomas Carnecky (1): Fix warning: cast from pointer to integer of different size are available in the git repository at: git://78.46.209.101/xorg/xserver extension-init-cleanup cgit web interface: http://78.46.209.101/git/xorg/xserver/log/?h=extension-init-cleanup Tomas Carnecky (11): Initialize the GLX provider stack with the swrast provider Move declarations from extinit.h to input.h Move extension declarations to include/extinit.h Change the prototype of PanoramiXExtensionInit() Include extinit.h so that the prototypes are properly defined Don't include modinit.h in Xext/ sources Remove modinit.h, move all remaining declarations to extinit.h Replace INITARGS with void Move declarations of the noXxxExtension booleans to extinit.h Remove all includes from extinit.h Clean up declarations to make sdksyms.sh happy Xext/bigreq.c |4 +- Xext/dpms.c |4 +- Xext/panoramiX.c |4 +- Xext/saver.c |4 +- Xext/security.c |3 +- Xext/shape.c |1 - Xext/shm.c|4 +- Xext/sync.c |2 +- Xext/xcmisc.c |4 +- Xext/xres.c |4 +- Xext/xselinux.c |3 +- Xext/xtest.c |4 +- glx/glxext.c |3 +- hw/xfree86/common/xf86Module.h|4 +- hw/xfree86/dixmods/dbemodule.c|2 +- hw/xfree86/dixmods/extmod/Makefile.am |1 - hw/xfree86/dixmods/extmod/modinit.c | 22 ++-- hw/xfree86/dixmods/extmod/modinit.h | 93 hw/xfree86/dixmods/extmod/xf86dga2.c |7 +- hw/xfree86/dixmods/recordmod.c|2 +- hw/xfree86/dri/drimodule.c|2 +- include/extinit.h | 157 +++--- include/globals.h | 87 +--- include/input.h | 17 +++ mi/miinitext.c| 195 ++--- 25 files changed, 205 insertions(+), 428 deletions(-) delete mode 100644 hw/xfree86/dixmods/extmod/modinit.h ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: extension init cleanup
Tomas Carnecky wrote: On 02/05/2009 10:53 PM, Paulo César Pereira de Andrade wrote: Tomas Carnecky wrote: I tried to clean up the header files that contain declarations for the various extension. Basically, in the end the header include/extinit.h contains the declarations of the extension init functions and declarations of the noXxxExtension booleans, sorted and put under their respective ifdef guards. It's that many patches because I tried to keep each commit as simple as possible, to make it easier to review. It should also be git-bisect friendly, meaning that after each single commit the tree builds. If you would rather see the patches, I can send them to the list as well. But I think I spammed the list enough yesterday so today it's just this cover mail. Hi, I Just looked up superficially, as I curious about the Clean up declarations to make sdksyms.sh happy commit. Actually, neither before nor after this commit does sdksyms.sh complain. That's because I put a whitespace before every extern declaration. I know that's cheatning, but I did this so I could work on the code without build failures - with the intention to fix it at the end, when I see the big picture (which functions are used from where etc). I did not track in which commit the prototypes were added to extinit.h, but if a symbol there is to be used by other shared objects, you should use extern _X_EXPORT type name(); and not just extern type name(); There is already enough mess in the source tree, so, if you added _X_EXPORT to the function definition, I suggest reconsider :-), as it makes it harder to have automated tools handling this stuff... And the only usages in sources, so far are basically GL and fooModuleData. The problem of adding it to sources is also mainly due to way too much functions declared by macros; Things things like xf86rename.h can easily get out of control. I kept the noXxxExtension declarations as-is (they were _X_EXPORT in includes/global.h, I just moved them to extinit.h). I didn't add any attribute to the functions though. Some are used only from within mi/miinitext.c (GE, SHAPE, bigreq, xkb, sync, xfixes and a few others). Other extensions are used from other modules (screensaver, dga, dri, glx, record, xv, ...). When I was chatting with Adam about extern and the various attributes, he said that he would like to make 'hidden' the default, and that you'd have to explicitly mark symbols for export. What's preventing us from using -fvisibility=hidden ? Are you compiling with --disable-visibility? :-) -fvisiblity=hidden is the default in git master for quite some time already... I'm willing to add the proper attributes the the functions. However there still is one issue: I need to prevent sdksyms.sh from picking up certain declarations, like this one: extern void DPMSExtensionInit(void); This function is defined in dbe/dbe.c, but is not being linked into libxorg.a but into a shared library that is later loaded by Xorg. So the final link fails because the symbol is missing. I worked around that by adding a whitespace before the declaration. Shouldn't sdksyms.sh only pick up declarations with _X_EXPORT? It parses cpp output, and _X_EXPORT may expand to nothing. But sdksyms.sh also parses (ignores) the expected gcc and sun cc expanded value. But about symbols that are defined in modules under the xorg/xserver tree, you could use the #ifdef XorgLoader trick I used for Xext headers, (it is somewhat the logic used for XFree86LOADER, but I did not want to use that symbol for safety...) as it is a mix of builtin and non builtin declarations, as well as modules, i.e. part is builtin in the Xorg binary, and part is in the extmod module. tom ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xf86-video-ati: [PATCH] Janitor: make distcheck, .gitignore.
I am starting to believe that, maybe -Wpointer-arith should not only be out of $CWARNFLAGS, but that $CWARNFLAGS should actually include -Wno-pointer-arith. Almost every casting is a sign of something going wrong, as the compiler should always able to do proper type conversion automatically, and changing the void *'s in the ati driver to something like an unsigned char * just to correct that warning may not be the proper solution. A Janitor: Fix compiler warnings should also be done, to add declarations to headers, and move prototypes in C files to H ones (I started doing that, but I also done a wrong git reset --hard and lost it, maybe next time :-)... From 5867bb7e801c8248fda4a603c20a5ba8f3b2141c Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Thu, 5 Feb 2009 20:47:17 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Use XORG_CHANGELOG and XORG_CWARNFLAGS macros, for automatic ChangeLog file generation and more verbose compiler warnings. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |5 + Makefile.am |4 ++-- configure.ac| 19 +++ src/Makefile.am |2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index ddc5574..c9e2bca 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,8 @@ radeon.4 radeon.4x stamp-h1 *cscope* +src/modes +src/parser +xf86-video-ati-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 87e90ba..1817e61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,11 +22,11 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man EXTRA_DIST = ChangeLog -CLEANFILES = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 8a6000a..de0d6fe 100644 --- a/configure.ac +++ b/configure.ac @@ -32,16 +32,16 @@ AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2]) +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_MAINTAINER_MODE # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC - -if test x$GCC = xyes; then - CPPFLAGS=$CPPFLAGS -Wall -fi +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -50,6 +50,7 @@ AC_ARG_WITH(xorg-module-dir, [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir=$withval], [moduledir=$libdir/xorg/modules]) +AC_SUBST([moduledir]) AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri], [Disable DRI support [[default=auto]]]), @@ -76,7 +77,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.2 xproto fontsproto $REQUIRED_MODULES]) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. @@ -230,9 +231,6 @@ else fi XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser' fi - -AC_SUBST([XMODES_CFLAGS]) - CPPFLAGS=$SAVE_CPPFLAGS AM_CONDITIONAL(USE_EXA, test x$USE_EXA = xyes) @@ -308,16 +306,13 @@ case $host_os in AC_DEFINE(FGL_LINUX, 1, [Use linux pragma pack]) ;; esac -AC_SUBST([XORG_CFLAGS]) -AC_SUBST([DRI_CFLAGS]) -AC_SUBST([moduledir]) - DRIVER_NAME=ati AC_SUBST([DRIVER_NAME]) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION XORG_CHECK_LINUXDOC +XORG_CHANGELOG AC_MSG_NOTICE( [The atimisc sub-driver has been split out to xf86-video-mach64:] diff --git a/src/Makefile.am b/src/Makefile.am index c15cc30..c500098 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -69,7 +69,7 @@ if USE_EXA RADEON_EXA_SOURCES = radeon_exa.c endif -AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DRI_CFLAGS) $(XMODES_CFLAGS) -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER INCLUDES = -I$(srcdir)/AtomBios/includes -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/driver/xf86-input-jamstudio: [PATCH] Janitor: make distcheck, .gitignore.
Peter Hutterer wrote: On Thu, Feb 05, 2009 at 03:27:34PM -0200, Paulo César Pereira de Andrade wrote: looking at the git log, jamstudio is dead and I'd rather bury it than put janitor patches in. It makes it look like the driver actually matters. we cannot simply put these dead drivers/libs/etc in some cgit limbo directory well hidden from the mortal humans? Just to organize a little bit the things. I wonder if anybody has tested these drivers for a long time. Still they are packaged and distributed by most distros. So, either they are working, or people that use this hardware is stuck with some old distro or custom setup. Or they have switched without noticing. the kernel provides a number of drivers and these devices will be picked up by evdev. I think most of these are hardware using serial port. Don't know how well the Linux evdev driver handle those. But IMO these are most likely systems that were bought. Someone builds an working environment and just sells it, while the users/owners don't know how to modify/customize anything. But these should be rare cases anyway. But while the repositories exist, the minimum that could be done is to have it consistent, and buildable. Because it's there we have to maintain it even if we don't have evidence that anyone uses it? It is arguably the same case as for old video cards. ISA cards don't work anymore with Xorg, so maybe it is time to just drop anything that uses only serial ports? Well, and new hardware apparently is having a tough time to keep track of the speed input api/abi changes :-) (But this is talking about one vendor only, and it's binary drivers still only for X Server 1.4). Having an API/ABI break every few months that requires a few LOC change and can fairly easily be #ifdef'd around every is too fast? Maybe that vendor should look at open-sourcing the driver then. I don't know :-) talk to the vendors, that most likely are just starting to see users wanting Linux drivers, but have their main target on Windows support. Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Fix cast int-to-pointer and pointer-to-int
Corbin Simpson wrote: Forgive my stupidity, but isn't it a C language rule that sizeof(long) == sizeof(void *) is always true? No. As said earlier in this thread there are IL32P64 systems. C only makes one guarantee regarding sizeof() and primitives, and that is that sizeof(char) == 1. ~ C. I think I was just remembering some old C book I read. I think I meant to say sizeof(long) = sizeof(void*). But probably this was not a guarantee, just probably what was true at the time the book was written. I did not follow much hardware programming discussions for quite some time. Just remembering when I switched my hobby programming from Turbo C in DOS to gcc in FreeBSD 2.0 (4 bytes ints and easy access to large vectors were awesome :-) But about type conversions, imo, casts are evil. This may be required regularly in C++, but one should be able to write things like: void a(struct t1 *arg) { b(t1); } void *b(void *ptr) { struct t1 *local = ptr; ...; return 0; } But this is a C thing (I have a project of a C like language that has runtime type/boundaries information to handle those), as it would make it easy to convert t1 to t2, etc, what could be a disaster in C++. Since there are already systems where sizeof(long) sizeof(void*), then some things can be tricky. Maybe in less then a decade we will also be using 128 bit computers, or why not, even more; should be enough at around 64 bytes computers, where it should be possible to index every particle of the universe with a distinct number :-) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/app/xhost: [PATCH] Remove support for old kerberos5 api.
After testing with a few other options, I come back to the old method of attaching a git format-patch formatted file to the message, and adding some intial comments. So that it would also make it easier to specify in the subject what repository the patch should be applied. Another option could be to create a bugzilla entry per patch. Paulo From 34d3a53de34a69ce295404a7fa2f7352ba3c920f Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 15:04:54 -0200 Subject: [PATCH] Remove support for old kerberos5 api. The support has already been removed from the X Server for a long time, and removal of some bits not under #ifdef K5AUTH from libXau caused xhost to fail compilation. It should be very unlikely someone is using current xorg to interface with 1993 X Servers. But the proper solution as pointed in the libXau commit would be to upgrade to current/modern Kerberos API, and correct X Server, libXau, and xhost. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- xhost.c | 50 -- 1 files changed, 0 insertions(+), 50 deletions(-) diff --git a/xhost.c b/xhost.c index 90a9b9c..1b2d966 100644 --- a/xhost.c +++ b/xhost.c @@ -232,9 +232,6 @@ main(int argc, char *argv[]) case FamilyNetname: printf(NIS:); break; - case FamilyKrb5Principal: - printf(KRB:); - break; case FamilyLocalHost: printf(LOCAL:); break; @@ -404,16 +401,6 @@ change_host(Display *dpy, char *name, Bool add) return 0; #endif } -else if (!strncmp(krb:, lname, 4)) { -#ifdef K5AUTH - family = FamilyKrb5Principal; - name +=4; -#else - fprintf (stderr, %s: not compiled for Kerberos 5\n, ProgramName); - free(lname); - return 0; -#endif -} else if (!strncmp(local:, lname, 6)) { family = FamilyLocalHost; } @@ -490,31 +477,6 @@ change_host(Display *dpy, char *name, Bool add) return 1; } #endif/* DNETCONN */ -#ifdef K5AUTH -if (family == FamilyKrb5Principal) { - krb5_error_code retval; - - retval = krb5_parse_name(name, princ); - if (retval) { - krb5_init_ets(); /* init krb errs for error_message() */ - fprintf(stderr, %s: cannot parse Kerberos name: %s\n, - ProgramName, error_message(retval)); - return 0; - } - XauKrb5Encode(princ, kbuf); - ha.length = kbuf.length; - ha.address = kbuf.data; - ha.family = family; - if (add) - XAddHost(dpy, ha); - else - XRemoveHost(dpy, ha); - krb5_free_principal(princ); - free(kbuf.data); - printf( %s %s\n, name, add ? add_msg : remove_msg); - return 1; -} -#endif if (family == FamilyLocalHost) { ha.length = 0; ha.address = ; @@ -866,18 +828,6 @@ get_hostname(XHostAddress *ha) return(nodeaddr); } #endif -#ifdef K5AUTH -if (ha-family == FamilyKrb5Principal) { - kbuf.data = ha-address; - kbuf.length = ha-length; - XauKrb5Decode(kbuf, princ); - krb5_unparse_name(princ, kname); - krb5_free_principal(princ); - strncpy(kname_out, kname, sizeof (kname_out)); - free(kname); - return kname_out; -} -#endif if (ha-family == FamilyLocalHost) { return ; } -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-evdev: [PATCH] Correct make distchek using the same solution used in other packages.
These cases should really be addressed in a different way, as the addition of a option that is only useful to pass distcheck is wrong. Another cosmetic thing that should be addressed is usage of something like: PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) AC_SUBST(XORG_CFLAGS) First the automake macro says: Checking for XORG... yes while it should say something more like: Checking for xorg-server... Checking for xproto... or maybe in the same line, but not really a xorg issue, but a pkg-config issue? The AC_SUBST issue is because there is a lot of mixed usage in Makefiles of @XORG_CFLAGS@ and $(XORG_CFLAGS) Paulo From 579e1ebf2431cbb0ea8b0ccb2febe87c6dba88b4 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 17:13:53 -0200 Subject: [PATCH] Correct make distchek using the same solution used in other packages. The problem is that the pattern substitutions used by automake don't work very well with pkg-config --variable when running make distcheck. Every single driver and several applications already uses a similar solution, sometimes not even using a pkg-config variable, see for example --with-xorg-module-dir. --- Makefile.am |1 + configure.ac |7 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3a59a65..201c284 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTOMAKE_OPTIONS = foreign +DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg if BUILD_TEST test_dir=test diff --git a/configure.ac b/configure.ac index 809799f..c54129c 100644 --- a/configure.ac +++ b/configure.ac @@ -74,8 +74,11 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS -sdkdir=$(pkg-config --variable=sdkdir xorg-server | - sed -e 's@/usr/incl...@$(includedir)@') +xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) +AC_ARG_WITH(sdkdir, + AC_HELP_STRING([--with-sdkdir=path], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir=$withval], [sdkdir=${xorg_sdkdir}]) AC_SUBST(sdkdir) # Checks for libraries. -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/app/xhost: [PATCH] Remove support for old kerberos5 api.
Alan Coopersmith wrote: I think it would be better to restore the definition of FamilyKrb5Principal to libXau - while it may not be used by the current code, it is defined/reserved for Kerberos5 and if a new implementation of that code was done using current API's, we'd presumably want to use the same family id for it.That constant at least is part of the network protocol, not the local implementation. That is a more correct solution. But would that value be used for modern Kerberos5 api? Probably should be, as it still is kerberos, and 5 :-) (so I presume only the programming API/ABI changed, but not the protocol), and would replace code that apparently has only compiled by 2 or 3 peoples in the past 15 years. (Though should someone really want to do this, our security people have suggested a new GSS-API authentication method might be a better idea than a Kerberos5 specific one, but that's up to whoever is doing the work.) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-joystick: [PATCH 1/2] Janitor: make distcheck, .gitignore.
The same solution proposed in xf86-input-evdev was used to correct make distcheck. This may not be the best solution as someone compiling from source may think the option should be used :-) From a98e4825b3268e3b57402dd64b5a3621159965cb Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 18:10:26 -0200 Subject: [PATCH 1/2] Janitor: make distcheck, .gitignore. The correction for make distcheck uses the same solution proposed for xf86-input-evdev, that uses the new configure option --with-sdkdir. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |4 Makefile.am |8 configure.ac| 21 ++--- man/.gitignore |3 --- src/.gitignore |6 -- src/Makefile.am |2 ++ 6 files changed, 24 insertions(+), 20 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index c96e99e..e5a79a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,7 +20,9 @@ ltmain.sh missing stamp-h1 *~ +*.4 xf86-input-joystick-*.tar.bz2 xf86-input-joystick-*.tar.gz ChangeLog *.pc +tags diff --git a/Makefile.am b/Makefile.am index bc41c7c..be8812f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,18 +19,18 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTOMAKE_OPTIONS = foreign +DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg SUBDIRS = src man config include pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-joystick.pc -EXTRA_DIST = autogen.sh ChangeLog - -CLEANFILES = ChangeLog +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 45a021a..fc4627a 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=joystick -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -72,12 +73,14 @@ XORG_DRIVER_CHECK_EXT(XKB, kbproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.3.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS +xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) +AC_ARG_WITH(sdkdir, + AC_HELP_STRING([--with-sdkdir=path], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir=$withval], [sdkdir=${xorg_sdkdir}]) AC_SUBST(sdkdir) -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) - # Checks for libraries. # Checks for header files. @@ -110,8 +113,12 @@ fi AC_HEADER_STDC +DRIVER_NAME=joystick +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 62796a4..000 --- a/man/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -joystick.4* diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index b30da44..fecb7e0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-joystick: [PATCH 2/2] Janitor: gcc 4.5 and sparse warnings.
This patch corrects most gcc/sparse warnings. The correction for code in format: if (a = b) rel = a - b; if (a = b) rel = b - a; rel = rel / foo; was changed to the logical equivalent, and clear to read, but also corrected the warning about rel possibly being used uninitialized :-) From 861e86e0c16e2547332279d01a2eabf5546a0967 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 18:23:00 -0200 Subject: [PATCH 2/2] Janitor: gcc 4.5 and sparse warnings. It is still required a patch in the X Server sdk to correct some remaining warnings. Isn't it amazing that X11/extensions/XKBsrv.h and $sdkdir/xkbsrv.h both use the #ifndef _XKBSRV_H_ include guard? Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- src/jstk.c |2 +- src/jstk_axis.c|4 ++-- src/jstk_key.c |6 +- src/jstk_options.c |2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/jstk.c b/src/jstk.c index 44acc48..a5ea298 100644 --- a/src/jstk.c +++ b/src/jstk.c @@ -519,7 +519,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) local-private = priv; local-type_name = XI_JOYSTICK; local-history_size = 0; -local-always_core_feedback = 0; +local-always_core_feedback = NULL; local-conf_idev = dev; priv-fd = -1; diff --git a/src/jstk_axis.c b/src/jstk_axis.c index 3c49bd3..233b2be 100644 --- a/src/jstk_axis.c +++ b/src/jstk_axis.c @@ -351,9 +351,9 @@ jstkHandleAbsoluteAxis(LocalDevicePtr device, int number) { float rel; int dif; -if (priv-axis[i].value = priv-axis[i].deadzone) +if (priv-axis[i].value priv-axis[i].deadzone) rel = (priv-axis[i].value - priv-axis[i].deadzone); -if (priv-axis[i].value = -priv-axis[i].deadzone) +else rel = (priv-axis[i].value + priv-axis[i].deadzone); rel = (rel) / (2.0f * (float)(32768 - priv-axis[i].deadzone)); diff --git a/src/jstk_key.c b/src/jstk_key.c index 4e9f710..b2c5b5d 100644 --- a/src/jstk_key.c +++ b/src/jstk_key.c @@ -34,9 +34,14 @@ #include X11/keysym.h #include X11/XF86keysym.h #include xf86Optrec.h + #include jstk.h #include jstk_key.h +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 5 +#include xkbsrv.h +#endif + #define AltMask Mod1Mask #define NumLockMask Mod2Mask #define AltLangMask Mod3Mask @@ -70,7 +75,6 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv) int i, j; XkbSrvInfoPtr xkbi; XkbControlsPtr ctrls; -XkbComponentNamesRec xkbnames; static struct { KeySym keysym; CARD8 mask; } modifiers[] = { { XK_Shift_L, ShiftMask }, diff --git a/src/jstk_options.c b/src/jstk_options.c index 309175e..8c0aba1 100644 --- a/src/jstk_options.c +++ b/src/jstk_options.c @@ -50,7 +50,7 @@ *** */ -int +static int jstkGetKeyNumberInMap(JoystickDevPtr priv, KeySym keysym) { -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Remove -Wbad-function-cast
Tomas Carnecky wrote: It's the source of many useless warnings. It was my suggestion to Peter to add -Wbad-function-cast (and a few others). I am not sure if the proper solution to the warnings is to not generate them :-) As I understand this option, the proper solution is of course not to create a temporary variable, but, first to not use a cast, as the compiler should be smart enough to do the right thing. I don't know enough about this one, but I suspect there may be performance in some inner loops, for example, a routine converts a integer expression to a double one, returns the double, and the code using the result converts it back to an integer... But probably this is not the reason this option exists. Signed-off-by: Tomas Carnecky t...@dbservice.com --- It causes warnings for code like: int i = (int) dixLookupPrivate(...); of which there is a lot in the xserver source. Fixing this is not easy, as it requires to create a temporary variable for the return value, and that is not easily possible when such constructs are used in macros. I also found this while googling around (originally posted to comp.lang.c): 8 gcc's documentation says: `-Wbad-function-cast (C only)' Warn whenever a function call is cast to a non-matching type. For example, warn if `int malloc()' is cast to `anything *'. This seems to be intended to catch the error of calling malloc() without a prototype in scope, an error that gcc is quite capable of catching directly (the usual message is warning: implicit declaration of function `malloc'). I wouldn't use that option myself. 8 We already warn about missing declaration (see in the patch below). (Cc: author of the XORG_CWARNFLAGS macro, commit 4cce4c81) xorg-macros.m4.in |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 9a2e26a..4a8dd2b 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -443,8 +443,7 @@ AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([AC_PROG_CC]) if test x$GCC = xyes ; then CWARNFLAGS=-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ --Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing case `gcc -dumpversion` in 4.*) CWARNFLAGS+= -Wold-style-definition -Wdeclaration-after-statement -- 1.6.1.2 Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-magellan: Janitor: make distcheck, .gitignore.
Another trivial patch. From 9d37cb0dd0841f9135727c81c63fc4cc0b510396 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 19:30:26 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Make distcheck is corrected by requiring a newer version of util-macros, that should have an up to date version of XORG_CHANGELOG macro (but it doesn't, and probably cannot ensure the user has a git that understands git log but not git-log as was used previously). Only the toplevel .gitignore file was left, and updated to match the requirements of the previous ones that existed in sub directories. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |4 Makefile.am |7 --- configure.ac| 15 +-- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 6 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index d90176e..2d9373b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs ChangeLog Makefile Makefile.in @@ -19,3 +21,5 @@ ltmain.sh missing stamp-h1 *~ +xf86-input-magellan-*.tar.* +tags diff --git a/Makefile.am b/Makefile.am index 42f8b54..6a0325e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,11 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man - -CLEANFILES = ChangeLog EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 4b3acd4..4743c73 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=magellan -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -77,16 +78,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=magellan +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 5ff68eb..920ef23 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-microtouch: [PATCH] Janitor: make distcheck, .gitignore.
This is another trivial patch, that updates the microtouch driver to match changes to other packages, to correct make distcheck and use a single .gitignore file. From 0b82c67edad92faf73506b7a7ee1d758a7599ac2 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 19:40:20 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Correct make distcheck by using XORG_CHANGELOG and a dist-hook. Use a single .gitignore file, updating the toplevel one to match what as specified before in the src and man subdirs. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |4 Makefile.am |6 -- configure.ac| 15 +-- man/.gitignore |2 -- src/.gitignore |6 -- src/Makefile.am |2 ++ 6 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index f51da24..1a13636 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs ChangeLog Makefile Makefile.in @@ -20,3 +22,5 @@ missing stamp-h1 *~ man/microtouch.? +xf86-input-microtouch-*.tar.* +tags diff --git a/Makefile.am b/Makefile.am index 42f8b54..4abead1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,10 +21,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man -CLEANFILES = ChangeLog +MAINTAINERCLEANFILES = ChangeLog EXTRA_DIST = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log .changelog.tmp mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' 2) + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 070d52b..2948c77 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=microtouch -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include xorg-server.h]) @@ -77,16 +78,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=microtouch +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 282522d..000 --- a/man/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index 5ff68eb..920ef23 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/driver/xf86-input-evdev: [PATCH] Correct make distchek using the same solution used in other packages.
Dan Nicholson wrote: These cases should really be addressed in a different way, as the addition of a option that is only useful to pass distcheck is wrong. For the patch, please use backticks (``) rather than $() for command substitution since it's more portable. Also, please use the variable I just reverted to what was already in place, but I agree, and would prefer to remove gratuitous bash'isms. $PKG_CONFIG. PKG_CHECK_MODULES (more specifically, PKG_PROG_PKG_CONFIG) has already looked up the tool for us, and using pkg-config directly means that we might not be honoring the user's wishes. I know that's not how the app-defaults patches were handled, but that doesn't make it right. You mean, it creates a XORG_sdkdir shell variable? My reading of m4 cannot find it in pkg.m4 (maybe I did not look carefully enough ...) That would be very useful indeed to replace the current calls. Another cosmetic thing that should be addressed is usage of something like: PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) AC_SUBST(XORG_CFLAGS) First the automake macro says: Checking for XORG... yes while it should say something more like: Checking for xorg-server... Checking for xproto... or maybe in the same line, but not really a xorg issue, but a pkg-config issue? That's how PKG_CHECK_MODULES works. I think it used to spit out all the deps it's looking up, but it gets out of hand when there are a lot of them (look at the xserver to see how many modules are used at once). You can look in config.log to see the details if you need to. It is just illogical what it prints. If the problem is that there may be too much things to print, it could just put print something different, like: Checking for required pkg-config modules... The AC_SUBST issue is because there is a lot of mixed usage in Makefiles of @XORG_CFLAGS@ and $(XORG_CFLAGS) It doesn't usually matter in practice, but it's nicer to use the variable $(var) rather than hardcoding the substitution so that a user could override it if necessary: make XORG_CFLAGS=-I/i/know/what/i_m/doing When possible I have been using $(XORG_CFLAGS), but did not want to gratuitously do a s/@(\w+)@/$(\1)/g in Makefile.am's... but it could be a good thing to do, mainly for consistency. -- Dan Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/driver/xf86-input-evdev: [PATCH] Correct make distchek using the same solution used in other packages.
Peter Hutterer wrote: or maybe in the same line, but not really a xorg issue, but a pkg-config issue? I'll merge such a patch if you have one for me. This should be corrected (if really an issue) in pkgconfig: % rpm -qf /usr/share/aclocal/pkg.m4 pkgconfig-0.23-4mdv2009.1 how is this patch different from Dan's patch from two days ago? I did not compare it with the patch posted by Dan some days ago. I just made the patch as make distcheck is broken in git master. But probably either patch should work. Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/app/xhost: [PATCH] Remove support for old kerberos5 api.
Ian Romanick wrote: On Wed, Feb 04, 2009 at 05:07:26PM -0200, Paulo César Pereira de Andrade wrote: After testing with a few other options, I come back to the old method of attaching a git format-patch formatted file to the message, and adding some intial comments. So that it would also make it easier to specify in the subject what repository the patch should be applied. There may be a slightly better way to do this. When I need to send patches to the list, I generally use mutt. Create the patch using git-format-patch, as you're doing. I then use 'mutt -H patch file' to send the patch. You'll have to edit and save the file, though. If you don't, mutt decides that you did not thing to the message and won't send it. For some reason I am not happy with it :-) There was another suggestion in irc: wereHamster pcpa: there's also git-imap-send and it is pretty interesting to put it as a draft, so one could use any MUA to edit it and choose sending or not, as long as it at least understand imap, and you are using imap of course :-) But I still disliked it because it makes it hard in some cases to actually get a verbatim copy of the email containing the patch, and git am at least wants the email headers, etc. Another option could be to create a bugzilla entry per patch. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/xserver: [PATCH] Janitor: change include/xkbsrv.h include guard symbol.
Peter Hutterer wrote: On Wed, Feb 04, 2009 at 07:05:42PM -0200, Paulo César Pereira de Andrade wrote: From 2e2ba17bbc5ef92fd52a85b53341651d79411332 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 18:33:57 -0200 Subject: [PATCH] Janitor: change include/xkbsrv.h include guard symbol. It conflicts with X11/extensions/XKBsrv.h. This is a minor cosmetic patch, as only a few input modules should want to include both files. which ones? The drivers shouldn't use the client-side headers. Afaik, only xf86-driver-joystick, and only if applying my patch for it (it needs prototype for XkbGetRulesDflts for the code under #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 5 Cheers, Peter Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- include/xkbsrv.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 4497220..d6d8995 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -24,8 +24,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. / -#ifndef _XKBSRV_H_ -#define _XKBSRV_H_ +#ifndef _xkbsrv_h +#define _xkbsrv_h #define XkbAllocClientMap SrvXkbAllocClientMap #define XkbAllocServerMap SrvXkbAllocServerMap @@ -1002,4 +1002,4 @@ _XFUNCPROTOEND #define XkbAtomGetString(s) NameForAtom(s) -#endif /* _XKBSRV_H_ */ +#endif /* _xkbsrv_h */ -- 1.6.1 Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg/driver/xf86-input-magellan: Janitor: make distcheck, .gitignore.
Dan Nicholson wrote: Another trivial patch. Looking at another one of these, I see small nit. configure.ac: XORG_CFLAGS=$XORG_CFLAGS $CWARNFLAGS Makefile.am: AM_CFLAGS = $(XORG_CFLAGS) It would be nicer if it was just Makefile.am: AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) Then I can actually manipulate the warning flags when I build instead of just using what configure came up with. I.e., make CWARNFLAGS=-Werror if I'm so inclined. Not a big deal, though. This is something that could be done in a second pass, and from now on. The current changes leave CFLAGS alone, but the hardcoding of verbose compiler warnings may not be always desirable, and needing to patch util-macros to achieve that may not be the better idea. But maybe, XORG_CWARNFLAGS should be modified to also automatically handle a -Werror configure option, and add it to $CWARNFLAGS? Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
xorg/driver/xf86-input-mouse: [PATCH] Janitor: use $PKG_CONFIG and update .gitignore.
Update .gitignore for files remaining after make and make distcheck, as well as entry for the default tags file. Also, from this patch on at least, start using non bash'isms (because it is how it is done in other packages) and use $PKG_CONFIG to better work on some build environments (as suggested by Dan Nicholson). From 259dfd693b543f96aa52a0fb226740951929bd58 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 4 Feb 2009 20:48:33 -0200 Subject: [PATCH] Janitor: use $PKG_CONFIG and update .gitignore. Signed-off-by: Paulo Cesar Pereira de Andrade p...@mandriva.com.br --- .gitignore |6 ++ configure.ac |2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index 2df4a8d..dfb9348 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,3 +20,7 @@ ltmain.sh missing stamp-h1 *~ +*.4 +xf86-input-mouse-*.tar.* +ChangeLog +tags diff --git a/configure.ac b/configure.ac index 9c4f034..db57697 100644 --- a/configure.ac +++ b/configure.ac @@ -63,7 +63,7 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server = 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. -- 1.6.1 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Add a prototype for CopyGetMasterEvent()
Peter Hutterer wrote: On Wed, Feb 04, 2009 at 12:03:12AM +0100, Tomas Carnecky wrote: This function is defined in mi/mieq.c and used in xkb/ddxDevBtn.c, hence it needs a prototype. Signed-off-by: Tomas Carnecky t...@dbservice.com --- include/input.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/input.h b/include/input.h index 3b7a173..a91e7e9 100644 --- a/include/input.h +++ b/include/input.h @@ -474,6 +474,14 @@ extern _X_EXPORT int AllocMasterDevice(ClientPtr client, extern _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to); +extern _X_EXPORT void CopyGetMasterEvent( +DeviceIntPtr mdev, +DeviceIntPtr sdev, +xEvent* original, +EventListPtr master, +int count +); + _X_INTERNAL is the better approach here. CGME should not be visible to anyone but the server itself. IMO _X_INTERNAL should be used with extreme care, as it may cause erroneous behavior if not properly used, while _X_HIDDEN always does what one would expect, but feel free to tell me otherwise :-) (probably a _X_PROTECTED would be more appropriate); _X_INTERNAL is also just __hidden attribute for Sun CC. The problem is that a function with attribute internal cannot be called via a function pointer by another shared object. Also note that in the current way sdksyms.sh parses cpp output, it will take the address of that function, because the header is in the build tree, and the line starts with extern (currently one could cheat by just adding a space before extern). So, the proper solution should be to declare the symbol in a non sdk header, where it would not be required to use any _X_FOO attribute. I plan to convert the cpp output parser to generate a linker script, what should be significantly more reliable, but the first approach was to automatically generate what was once a series of hand written and outdated files (but referencing enough symbols to prevent the linker from finding unreachable symbols, that would only be reachable from external modules). Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: autoreconf issue with libXfont
Jeremy Huddleston wrote: So this is a bit odd... I'm found an issue with libXfont that is making me a bit nuts. I think it's probably related to libtool, autoconf, or automake... I wanted to see if anyone has seen something similar... When starting the server, it immediately dies because it can't find fonts: Could not init font path element /opt/local/share/fonts/misc/, removing from list! BUT the font cache is correct. Rebuilding libXfont-1.3.3 from the distributed tarball gets us a working server. Doing 'autoreconf -fvi' before rebuilding libXfont-1.3.3 triggers this bug. ??? Anyone got a clue-stick? libXfont has some weak symbols, that are defined both, the X Server and in libXfont. In the X Server, these symbols must be exported, or the stub libXfont one will end up being used. But afaik, all of them use some sort of attribute to mark them as weak symbols. I am by no means an expert on this stuff, but I noticed weird things related to it, that don't happen in x86, but will cause linking errors on mips. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-input-evdev: Changes to 'master'
Dan Nicholson wrote: diff --git a/configure.ac b/configure.ac index 4ba5a8a..809799f 100644 --- a/configure.ac +++ b/configure.ac @@ -72,19 +73,22 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS +sdkdir=$(pkg-config --variable=sdkdir xorg-server | + sed -e 's@/usr/incl...@$(includedir)@') AC_SUBST(sdkdir) The sdkdir handling breaks installation of the properties header. This is wrong on many levels. If you want to fix distcheck, please do it like we talked about for the app-defaults directory. configure.ac: AC_ARG_WITH([sdkdir], [AC_HELP_STRING([--with-sdkdir],[the xserver SDK directory (default: from pkg-config)])], [sdkdir=$withval], [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) AC_SUBST([sdkdir]) Makefile.am: DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' You are right. It was naive of me to only test with --prefix=/usr But I think a better approach should be found for pkg-config variables, as creating a configure option is basically only to correct make distcheck. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-input-evdev: Changes to 'master'
Peter Hutterer wrote: On Tue, Feb 03, 2009 at 12:35:14AM -0200, Paulo César Pereira de Andrade wrote: Dan Nicholson wrote: diff --git a/configure.ac b/configure.ac index 4ba5a8a..809799f 100644 --- a/configure.ac +++ b/configure.ac @@ -72,19 +73,22 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +XORG_CFLAGS=$CWARNFLAGS $XORG_CFLAGS +sdkdir=$(pkg-config --variable=sdkdir xorg-server | + sed -e 's@/usr/incl...@$(includedir)@') AC_SUBST(sdkdir) The sdkdir handling breaks installation of the properties header. This is wrong on many levels. If you want to fix distcheck, please do it like we talked about for the app-defaults directory. configure.ac: AC_ARG_WITH([sdkdir], [AC_HELP_STRING([--with-sdkdir],[the xserver SDK directory (default: from pkg-config)])], [sdkdir=$withval], [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) AC_SUBST([sdkdir]) Makefile.am: DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' You are right. It was naive of me to only test with --prefix=/usr But I think a better approach should be found for pkg-config variables, as creating a configure option is basically only to correct make distcheck. can you please explain what's wrong with make distcheck that it requires fixing? make distcheck can be seen as a test of a build and install in a controlled environment. It checks if the tarball contains all the files required to build the package, among other tests. The problem in the xf86-input-evdev was it attempting to install files outside of DESTDIR. Actually, if you run make distcheck as root user, it will work. As will it work if you specify a wrong destdir but with correct permissions (usually a path not starting with / and installing in the build directory), and not cause any warnings. The problen Dan is talking about is that the patch I made was wrong and would only work with something like % ./autogen.sh --prefix=/usr because it broke both normal make install and make distcheck for other prefixes. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (xhost)
Daniel Stone wrote: On Tue, Feb 03, 2009 at 12:24:14AM -0200, Paulo César Pereira de Andrade wrote: Anyway, my freedesktop account appears to not be functional, so I will not be able to correct it now. Hopefully by tomorrow, or later tonight it is corrected... Yes, I made the decision. Per IRC: 00:57 whot pcpa: please start sending patches to the list before committing 01:32 daniels pcpa: i've removed your commit bit, please send future patches through the list I hope this is not a final decision. And would hope for a more formal message, other then a notification in IRC while I am marked as away, and due to no response in 30 minutes have my commit rights removed. The problem in xf86-input-evdev was that I only tested the make distcheck correction using --prefix=/usr. I don't disagree that for this special case, given that xf86-input-evdev is actively maintained by you and Peter, it would have been better to first post the janitor patch to the list for comments and approval. I even added a comment of what would be a more proper solution (exactly what Dan Nicholson said in another email), but it still is not what I believe is the proper solution to handle pkg-config variables specifying directories (unfortunately I did not implement that because the simpler, but wrong solution, worked in my test case). I avoided making the make distcheck corrections in a batch so that if any problems arised, it would be noticed earlier. And posting a huge amount of frequently one liners, trivial patches, would just add gratuitous noise to the list. Well, I just hope this is not the final response for voluntary work on correcting make distcheck and other trivial problems in the xorg packages. Cheers, Daniel Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (libXi)
Chris Ball wrote: http://tinderbox.x.org/builds/2009-01-29-0034/logs/libXi/#configure configure: error: Package requirements (xproto = 7.0.13 x11 = 1.1.99.1 xextproto = 7.0.3 xext = 1.0.99.1 inputproto = 1.9.99.6) were not met: Requested 'xext = 1.0.99.1' but version of Xext is 1.0.5 I think this is kind of a flaw in http://xorg.freedesktop.org/wiki/Development/Documentation/VersionNumberScheme that may happen in other packages if for some reason an intermediate release must be done. In this case it was done to ensure people building from tarballs would not have these kinds of issues. The correction would be to either make git libXi require xext = 1.0.5, or change back git version of xext to 1.0.99.1. But it was my fault to not properly foresee the consequences of doing a new release of xextproto, a suggested in the bug report :-) And then, need to do a libXext release also... I think the best approach now is to go with changing back git xext version... until a 1.1.x release is made available. -- Chris Ball c...@laptop.org Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (xserver)
Chris Ball wrote: http://tinderbox.x.org/builds/2009-01-30-0005/logs/xserver/#build In file included from ../Xext/panoramiX.h:43, from dispatch.c:134: /home/cjb/xorg-build/include/X11/extensions/panoramiXext.h:48: error: expected ')' before '*' token /home/cjb/xorg-build/include/X11/extensions/panoramiXext.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'XPanoramiXQueryVersion' It is me striking again :-) Since there was already one missing prototype declared in panoramiXext.h, I just added the remaining ones, but that requires defining Display to something (yes, I did not remember the X Server build could include that header...) The X Server build only needs the macros PANORAMIX_MAJOR_VERSION and PANORAMIX_MINOR_VERSION from X11/extensions/panoramiXext.h One option is to use the schema used by some other related cases, and protect the prototypes there with something like: #ifndef _PANORAMIX_SERVER ... #endif Or move those macros to X11/extensions/panoramiXproto.h like is done in other similar cases. There is also some code doing weird things to get Display defined, see xserver/Xext/securitysrv.h To avoid the risk of breaking things elsewhere, the proper correction should be to protect the prototypes with: #ifndef _PANORAMIX_SERVER and add _XFUNCPROTOBEGIN/_XFUNCPROTOEND while at it. -- Chris Ball c...@laptop.org Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xserver: Branch 'master'
Peter Hutterer wrote: Nothing agains't disabling it. But it should be building since commit 6ef46c40e62def4841a4cff4e0b443516a2ed782, and have the same problems as kdrive based servers. Since this is probably a case of nobody cares to maintain, then it should be better to just remove it. As it is really only useful for being a simpler version of Xephyr, and only barely useful for things like debug grabs on toolkit codes... configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd Author: Peter Hutterer peter.hutte...@redhat.com Date: Wed Jan 28 07:51:32 2009 +1000 Disable Xnest by default. Xneest doesn't build right now and is in the process of being removed. So let's not build it by default. diff --git a/configure.ac b/configure.ac index 38397fc..71d37df 100644 --- a/configure.ac +++ b/configure.ac @@ -581,7 +581,7 @@ dnl DDXes. AC_ARG_ENABLE(xorg,AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) AC_ARG_ENABLE(xvfb,AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) -AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) +AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: no)]), [XNEST=$enableval], [XNEST=no]) AC_ARG_ENABLE(xquartz,AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addigion to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) AC_ARG_ENABLE(xwin,AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Recent input changes
Ben Gamari wrote: The only strange behavior I noticed so far (after waiting some days to run git master again :-)) was with the Alt key. xev says order of events is correct, but the event state field appears to be messed, and only set to the proper value after the next key press. This breaks all Alt+key shortcuts in xedit (help) :-) Strangely enough, before I login (in gdm) things seem to behave as they should. Directly after I login though (even before my own minimal ~/.Xmodmap has been loaded), the behavior I described earlier begins. - Ben On Sun, Jan 25, 2009 at 11:13 AM, Ben Gamari bgam...@gmail.com wrote: As it turns out, the problem seems to be my modmap. I'm not sure how this happened as before the upgrade things were fine, but the xserver seems to have gone a little crazy in assigning modifiers: xmodmap: up to 9 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e), Alt_L (0x40), Alt_R (0x6c), Supe r_L (0x85), Super_R (0x86), Meta_L (0xcd), Super_L (0xce), Hyper_L (0xcf) lockControl_L (0x25), Alt_L (0x40), ISO_Level3_Shift (0x5c), Control_ R (0x69), Alt_R (0x6c), Mode_switch (0xcb), Meta_L (0xcd) control Num_Lock (0x4d), ISO_Level3_Shift (0x5c), Super_L (0x85), Super_R (0x86), Mode_switch (0xcb), Super_L (0xce), Hyper_L (0xcf) mod1 mod2 mod3 mod4 mod5 Furthermore, xmodmap is unwilling to let me change the modifier setup, [ b...@mercury ~] $ xmodmap -e 'remove Shift = Alt_L' xmodmap: bad set modifier mapping. [1112 b...@mercury ~] $ xmodmap -e 'clear Shift' xmodmap: bad set modifier mapping. [1112 b...@mercury ~] $ xmodmap -e 'add Control = Control_L' xmodmap: bad set modifier mapping. Any ideas? Thanks, - Ben Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Recent input changes
Peter Hutterer wrote: The only strange behavior I noticed so far (after waiting some days to run git master again :-)) was with the Alt key. xev says order of events is correct, but the event state field appears to be messed, and only set to the proper value after the next key press. This breaks all Alt+key shortcuts in xedit (help) :-) the state field shows the modifier state before the key was pressed. FWIW, I had problems with my Alt key not working after updating. Creating a test user worked fine though, and after removing the .gnome2 and .gnome2_private directories in my home directory everything was ok again. I don't know why this fixed it or why the problem occured in the first place. Maybe it is something related to modifiers? xkbvleds doesn't update to match active leds, while xkbwatch does. I don't use gnome, but to make sure, I removed the .gnome* directories. I made a few other basic tests, mouse keys appears to be completely wrong, jumping to either bottom/right of screen, or just maximum Y. I am running git master of every freedesktop package. Now that I am here :-) Will the joystick, keyboard and void drivers be updated to compile with git master? Most applications appears to work, i.e. Alt+F will open the menu dialog in firefox, Alt+Tab will circulate windows in windowmaker. The problem appears to affect libXt based applications, but Alt also doesn't work in emacs. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Wait for hald during initialization when necessary
Yan Li wrote: Attached the new version without attempting any magic fallback (and using 8 spaces instead of tabs) Tested and functional by stoping hald, running startx, and starting hald from a ssh connection, so that in no more then 8 seconds the keyboard and mouse start responding... Thanks for this new patch. I'll test it extensively. One thing I'd like to change is to set the timer to 150ms, since this is the time we've measured with my patch using usleep(). I believe waiting for 150ms is enough for most situations. +#define RECONNECT_TIMEOUT (8 * 1000) +#define RECONNECT_TIMEOUT(150) I believe the most common problem is the situation you are describing: hald not ready by the time the X Server is loading, usually due to some timing issue, and by like less then one second. Maybe you could use 150ms in config/hal.c:connect_hook(), and use like 2-4 seconds if it the first timer failed. Or maybe Daniel or Peter will implement what they commented some days ago, that is listen for a dbus message that tells when hald is ready and accepting connections? (I don't know about dbus internals, and did not know dbus had that feature...) -- Li, Yan Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Wait for hald during initialization when necessary
Peter Hutterer wrote: +/* hald might not finish it's init yet, we'll wait for it for 2s */ +unsigned int wait_for_hal = 2 * 100; +const unsigned int wait_for_hal_sleep_time = 100 * 1000; + +/* hald might not be ready now, waiting for it for a few seconds */ +while (wait_for_hal = wait_for_hal_sleep_time) +{ +if (libhal_ctx_init(info-hal_ctx, error)) +goto ctx_init_done; + +LogMessage(X_INFO, config/hal: waiting for hald...\n); +usleep (wait_for_hal_sleep_time); +wait_for_hal -= wait_for_hal_sleep_time; } I think it'd be better to set a timer to fire off the reinitialization rather than a simple usleep. Doing so allows us to finish the server initialization without having to wait for hal. Any opinions? I can rework my patch to remove the hal_giveup() function, and use a timer firing like every 8 seconds. The idea of fallback to load/use kbd/mouse would be really only useful in a few special cases on broken setups (usually development setups :-), so that one would have a functional keyboard/mouse after sometime, as long as the kdb and mouse drivers were functional (wrong abi would be enough to have a inputless X Server...). Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Wait for hald during initialization when necessary
Paulo César Pereira de Andrade wrote: I think it'd be better to set a timer to fire off the reinitialization rather than a simple usleep. Doing so allows us to finish the server initialization without having to wait for hal. Any opinions? I can rework my patch to remove the hal_giveup() function, and use a timer firing like every 8 seconds. The idea of fallback to load/use kbd/mouse would be really only useful in a few special cases on broken setups (usually development setups :-), so that one would have a functional keyboard/mouse after sometime, as long as the kdb and mouse drivers were functional (wrong abi would be enough to have a inputless X Server...). Attached the new version without attempting any magic fallback (and using 8 spaces instead of tabs) Tested and functional by stoping hald, running startx, and starting hald from a ssh connection, so that in no more then 8 seconds the keyboard and mouse start responding... Paulo From 33e4f4ddc228a359f8a9493f37dd0edcdc2aa78a Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Wed, 21 Jan 2009 14:54:48 -0200 Subject: [PATCH] Add a connect retry timer to interface hal daemon. Hal may be initialized in the background, and not accepting connections by the time the X Server attempts to connect to it. This patch adds a retry timer that fires every 8 seconds. --- config/hal.c | 49 + 1 files changed, 41 insertions(+), 8 deletions(-) diff --git a/config/hal.c b/config/hal.c index 8dfbb07..3b17579 100644 --- a/config/hal.c +++ b/config/hal.c @@ -43,10 +43,13 @@ #define LIBHAL_PROP_KEY input.x11_options. #define LIBHAL_XKB_PROP_KEY input.xkb. +/* Retry hal connection every 8 seconds */ +#define RECONNECT_TIMEOUT (8 * 1000) struct config_hal_info { DBusConnection *system_bus; LibHalContext *hal_ctx; +OsTimerPtr timer; }; /* Used for special handling of xkb options. */ @@ -58,6 +61,11 @@ struct xkb_options { char* options; }; +static int +hal_connect(struct config_hal_info *info); + +static CARD32 +hal_connect_timer(OsTimerPtr timer, CARD32 time, pointer arg); static void remove_device(DeviceIntPtr dev) @@ -467,16 +475,13 @@ disconnect_hook(void *data) info-system_bus = NULL; } -static void -connect_hook(DBusConnection *connection, void *data) +static int +hal_connect(struct config_hal_info *info) { DBusError error; -struct config_hal_info *info = data; char **devices; int num_devices, i; -info-system_bus = connection; - dbus_error_init(error); if (!info-hal_ctx) @@ -485,6 +490,7 @@ connect_hook(DBusConnection *connection, void *data) LogMessage(X_ERROR, config/hal: couldn't create HAL context\n); goto out_err; } +libhal_ctx_set_cache(info-hal_ctx, FALSE); if (!libhal_ctx_set_dbus_connection(info-hal_ctx, info-system_bus)) { LogMessage(X_ERROR, config/hal: couldn't associate HAL context with bus\n); @@ -512,7 +518,7 @@ connect_hook(DBusConnection *connection, void *data) dbus_error_free(error); -return; +return 0; out_ctx2: if (!libhal_ctx_shutdown(info-hal_ctx, error)) @@ -524,9 +530,36 @@ out_err: dbus_error_free(error); info-hal_ctx = NULL; -info-system_bus = NULL; -return; +return 1; +} + +static CARD32 +hal_connect_timer(OsTimerPtr timer, CARD32 time, pointer arg) +{ +struct config_hal_info *info = (struct config_hal_info *)arg; + +if (hal_connect(info) == 0) { +TimerFree(info-timer); +info-timer = NULL; +return 0; +} + +return RECONNECT_TIMEOUT; +} + +static void +connect_hook(DBusConnection *connection, void *data) +{ +struct config_hal_info *info = data; + +info-system_bus = connection; +if (hal_connect(info) != 0) { +if (info-timer) +TimerFree(info-timer); +info-timer = TimerSet(NULL, 0, RECONNECT_TIMEOUT, + hal_connect_timer, info); +} } static struct config_hal_info hal_info; -- 1.6.0.5 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (app/xkbcomp)
Chris Ball wrote: http://tinderbox.x.org/builds/2009-01-21-0032/logs/xkbcomp/#build xkbparse.y:101: error: static declaration of 'parseDebug' follows non-static declaration utils.h:262: error: previous declaration of 'parseDebug' was here http://cgit.freedesktop.org/xorg/app/xkbcomp/commit/?id=f099da35386cf63d4935ba2613409ff28b3d7ea5 Either my mind is playing with me, or something was wrong in my build when I tested it before pushing the changes; I blame the fact that make clean doesn't remove the .c file generated from the .y one, and it is also added to the dist tarball :-) Just corrected it. Thanks for the report. -- Chris Ball c...@laptop.org Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xorg server should wait HAL if it's not avail during init
Tino Keitel wrote: On Tue, Jan 20, 2009 at 10:18:10 +0100, Matija Å uklje wrote: Dne torek 20. januarja 2009 je Yan Li napisal(a): I suggest we add a short (5 seconds) busy-wait if hald is not usable. Isn't that more of a (distro's) init system problem? The problem is that most of those service dependency stuff ignores the fact that daemons may need some time to really become available for service. They just start a service and don't have a way to check if the service is really available. Combined with missing failure handling (like starting a service, noticing that the service terminated because another required service was not yet available, wait a few seconds, and try again automatically), such service dependencies are pretty useless if reliability is a requirement. The current code already have a retry every second callback/timer schema to connect to dbus. It should not require too much work to implement a similar system for hal; but I think it would be better something like, try in 1, 2, 4, 8, 16, 32 seconds, and if failing after like 32 (or more seconds), revert to use the kdb/mouse drivers, just fail, or does the evdev driver work without hald running? This should be an issue for netbooks, or any attempt at having a fast boot to an usable interface... Regards, Tino Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[PATCH] Add hal/dbus fallback when not able to talk to hal/dbus daemons.
This is a possible solution for the problem reported in the xorg server should wait HAL if it's not avail during init thread. In my tests, it worked when running this: % sudo service haldaemon stop; startx -- -verbose 3 After waiting all the timeouts, it loaded kbd and mouse drivers, and I had a usable desktop (I don't use gnome/kde). And also worked when running: % startx -- -verbose 3 sleep 5; sudo service haldaemon start After a few timeouts it managed to connect to hal and just worked as expected. Maybe the timeouts should be configurable, etc. But consider this, a beta patch :-) (The attached patch doesn't include the trivial changes required to compile today's git master). Thanks, Paulo From 83a9866fc806a72740e5c0c81009e4220316765d Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Tue, 20 Jan 2009 19:36:59 -0200 Subject: [PATCH] Add hal/dbus fallback when not able to talk to hal/dbus daemons. hal/dbus may not be yet initialized in a fast boot where the X Server may be started before some system daemons, or one may choose to just not run the haldaemon service. This patch adds code to attempt connection with hal after 1, 2, 4, 8, 16 and 32 seconds. If hald is not available after that period, it will load the kbd and mouse drivers, and FatalError() if cannot load either. Details when adding different implementations, or changes to this patch: o libhal_ctx_set_cache() must be called, or it will never notice if hald has been started. o if you set check info-system_bus to NULL, make sure you set it to the proper value again, when retrying to connect to hald. --- config/hal.c | 93 +- 1 files changed, 85 insertions(+), 8 deletions(-) diff --git a/config/hal.c b/config/hal.c index 8dfbb07..c7207d7 100644 --- a/config/hal.c +++ b/config/hal.c @@ -47,6 +47,9 @@ struct config_hal_info { DBusConnection *system_bus; LibHalContext *hal_ctx; +OsTimerPtr timer; +int timeout; +Bool giveup; }; /* Used for special handling of xkb options. */ @@ -58,6 +61,14 @@ struct xkb_options { char* options; }; +static int +hal_connect(struct config_hal_info *info); + +static CARD32 +hal_connect_timer(OsTimerPtr timer, CARD32 time, pointer arg); + +static void +hal_giveup(void); static void remove_device(DeviceIntPtr dev) @@ -467,16 +478,13 @@ disconnect_hook(void *data) info-system_bus = NULL; } -static void -connect_hook(DBusConnection *connection, void *data) +static int +hal_connect(struct config_hal_info *info) { DBusError error; -struct config_hal_info *info = data; char **devices; int num_devices, i; -info-system_bus = connection; - dbus_error_init(error); if (!info-hal_ctx) @@ -485,6 +493,7 @@ connect_hook(DBusConnection *connection, void *data) LogMessage(X_ERROR, config/hal: couldn't create HAL context\n); goto out_err; } +libhal_ctx_set_cache(info-hal_ctx, FALSE); if (!libhal_ctx_set_dbus_connection(info-hal_ctx, info-system_bus)) { LogMessage(X_ERROR, config/hal: couldn't associate HAL context with bus\n); @@ -512,7 +521,7 @@ connect_hook(DBusConnection *connection, void *data) dbus_error_free(error); -return; +return 0; out_ctx2: if (!libhal_ctx_shutdown(info-hal_ctx, error)) @@ -524,9 +533,77 @@ out_err: dbus_error_free(error); info-hal_ctx = NULL; -info-system_bus = NULL; -return; +return 1; +} + +static CARD32 +hal_connect_timer(OsTimerPtr timer, CARD32 time, pointer arg) +{ +struct config_hal_info *info = (struct config_hal_info *)arg; + +if (hal_connect(info) == 0) { + TimerFree(info-timer); + info-timer = NULL; +} +else { + info-timeout = 1; + if (info-timeout 64) { + LogMessage(X_WARNING, config/hal: retrying in %d seconds\n, + info-timeout); + + return (info-timeout * 1000); + } + else { + LogMessage(X_ERROR, config/hal: using fallbacks\n); + if (!info-giveup) + hal_giveup(); + info-giveup = TRUE; + } +} + +return (0); +} + +static void +hal_giveup(void) +{ +DeviceIntPtr dev; +InputOption *options; + +options = NULL; +/* Or add another interface to tell it to enable this device */ +add_option(options, _source, server/hal); +add_option(options, driver, kbd); +add_option(options, identifier, kbd); +if (NewInputDeviceRequest(options, dev) != Success) + FatalError(Failed to add a core keyboard\n); + +options = NULL; +/* Or add another interface to tell it to enable this device */ +add_option(options, _source, server/hal); +add_option(options, driver, mouse); +add_option(options, identifier, mouse); +add_option(options, device, /dev/input/mice); +if (NewInputDeviceRequest(options, dev) != Success) + FatalError(Failed to add a core pointer\n); +} + +static void +connect_hook(DBusConnection
Re: Current tinderbox regression (xserver)
Ian Romanick wrote: On Tue, 2009-01-20 at 14:30 -0500, Chris Ball wrote: http://tinderbox.x.org/builds/2009-01-20-0024/logs/xserver/#build ./.libs/libxorg.a(sdksyms.o):(.data.rel+0x308): undefined reference to `CreateUnclippedWinSize' http://cgit.freedesktop.org/xorg/xserver/commit/?id=20d2117eb82fb7ce91afd4f01fe1b9d4b1bf0459 I'm seeing this also. It seems like the sdksyms.sh script should try to pull in this symbol since it isn't decorated with _X_EXPORT. The attached patch makes that part of the build work, but is...eh...unpleasant to my eyes. The magic in sdksyms.sh is to remove the extern before the symbol name. But really, this should not be done, and instead, such symbols should be declared on non sdk headers, or at least add a comment telling that this symbol is in the header, but should not be used by drivers... I will try to rework on a more complete initial patch to correct most sdk headers problems; last time I posted one, I did not receive much love :-) With that fixed, I hit the following failure: kbd.c:148: error: â__XKBDEFRULES__â undeclared here (not in a function) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Add hal/dbus fallback when not able to talk to hal/dbus daemons.
Daniel Stone wrote: On Tue, Jan 20, 2009 at 08:21:45PM -0200, Paulo César Pereira de Andrade wrote: This is a possible solution for the problem reported in the xorg server should wait HAL if it's not avail during init thread. Please do not push this patch. I posted the patch more as a request for comments, as I did more of a quick hack patch. While it works as is, it should be more integrated with the current code, as it is relying on dbus being started at some time, before attempting to connect to hal, but there is already a keep retrying timer code for dbus. It also uses a ugly hack to not call the xf86* functions, and fool NewInputDeviceRequest to not only add the input device, but also enable it. But I believe such a fallback would not hurt, and would help distros to have a common code base, without the need of different X Servers for different computers/profiles, otherwise, for things like netbooks, or just some start services in parallel schema, a similar patch is required, as it is desirable to have a X Server up and running, loading the desktop environment, without the need of waiting for hal/dbus, things like udev, or any other blo^H^H^H time consuming service. Cheers, Daniel Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Font rendering problem in 1.6 branch (fine in 1.5 and master)
Keith Packard wrote: On Fri, 2009-01-16 at 14:58 -0800, Dan Nicholson wrote: On Fri, Jan 16, 2009 at 2:51 PM, Jeremy Huddleston jerem...@freedesktop.org wrote: Ah... I figured it out... It has to do with --enable-builtin-fonts going from no by default in 1.5 to yes by default in 1.6 to being removed in master. If this is being punted in master, and has been off in previous releases, should we turn it back off in 1.6 by reverting 385943e0e97463ce4681a9b6a4a40d7e3c91e51e ? http://cgit.freedesktop.org/xorg/xserver/commit/?id=385943e0e97463ce4681a9b6a4a40d7e3c91e51e What about backporting 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 to 1.6? http://cgit.freedesktop.org/xorg/xserver/commit/?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 I'm good with either pulling the master stuff to 1.6 or reverting the 1.6-specific change. But, I'd need to see a patch from the 1.6 branch and the promise that someone (or ones) tested it. I had to hack googleearth to remove the custom libQt so that I could get fonts displayed in that application... Attached is the patch just backported to 1.6 branch (careful, it is still hot :-)), including the extra change I made in master (s/free/xfree/). Tests I did were: 1. start with a valid font path specified in xorg.conf 2. start without a font path specified in xorg.conf, and non existant default font path 3. start without a font path specified in xorg.conf, and correct default font path 4. start with startx -- -fp incorrect-font-path 5. start with startx -- -fp properly-specified-font-path 6. start with font path specified in xorg.conf, but without fonts in the directory (i.e.; cd /tmp; mkfontdir; startx -- -fp /tmp) It worked as expected in all cases (falling back to builtin fonts if the real fixed font could not be found) Paulo 0001-Default-to-use-standard-bitmap-fonts-with-builtins.patch Description: Binary data ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: two small patches for ico xgc (configure.ac typos)
Dan Nicholson wrote: On Wed, Jan 14, 2009 at 5:14 AM, Jens Stroebel dr-x...@bcsoft.de wrote: Hi. Attached are two patches for app/ico and app/xgc which had small typos in their configure.ac's. Good catched. Pushed as: ico: 5ca33a50e4a643b8ed7a525e39ecec9b34f1900a xgc: cc62903f999ba0c5076861888106365e3561f775 Thanks. I should not try to debug the X Server, and make these kinds of changes at the same time :-) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
DESTDIR and pkg-config variables
What is the proper way to correct make distcheck, when using pkg-config directory variables? Sample case is appdefaultdir for Xt/Xaw based applications. That usually, in configure.ac is: PKG_CHECK_MODULES(APPDEFS, xt) appdefaultdir=$(pkg-config --variable=appdefaultdir xt) AC_SUBST(appdefaultdir) And for example, for xgc, in Makefile.am's it is: appdefaultdir = @appdefaultdir@ dist_appdefault_DATA = \ app-defaults/Xgc But it will fail for make distcheck, as appdefaultdir should have been specified as $(datadir)/X11/app-defaults and not /usr/share/X11/app-defaults. Is hacking xt.pc the proper way to correct the problem? Or change every package, possibly using an approach like the one used by all drivers, that is something like: AC_ARG_WITH(xorg-module-dir, AC_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir=$withval], [moduledir=$libdir/xorg/modules]) Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: DESTDIR and pkg-config variables
Julien Cristau wrote: On Mon, Jan 12, 2009 at 09:50:46 -0800, Dan Nicholson wrote: I think the right way to do this is 1) Keep taking the default from pkg-config and 2) Pass in a value during distcheck with DISTCHECK_CONFIGURE_FLAGS. That'd look something like this: configure.ac: AC_ARG_WITH([appdefaultdir], [AC_HELP_STRING([--with-appdefaultdir=DIR], [Xt app-defaults directory (default: from pkg-config)])], [appdefaultdir=$withval], [appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`]) Makefile.am: DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir='$${datadir}/X11/app-defaults' I just tested that on xfontsel and it works. IIRC I did exactly that in xdm. Thanks. For simplicity, I feel tempted to remove: PKG_CHECK_MODULES(APPDEFS, xt) appdefaultdir=$(pkg-config --variable=appdefaultdir xt) AC_SUBST(appdefaultdir) from configure.ac, and hardcode Makefile.am to: appdefaultdir = $(datadir)/X11/app-defaults This mainly, because in my computer I have app-defaults directories in: /etc/X11/app-defaults /etc/X11/choose-some-language/app-defaults /usr/X11R6/lib/X11/app-defaults /usr/share/apps/kdisplay/app-defaults /usr/share/app-defaults /usr/share/X11/app-defaults /usr/lib/app-defaults /usr/lib/X11/app-defaults /opt/kde3/share/apps/kdisplay/app-defaults /usr/lib/program-name/app-defaults But probably better to have it easy to specify in configure arguments, and respect the value configured in libXt. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [Brainstorm] LinkKit for Xorg
Rémi Cardona wrote: Le 10/01/2009 03:10, Paulo César Pereira de Andrade a écrit : Xorg (and to some extent XFree86) loadable modules aren't really of much use, as modules cannot be properly unloaded, there is no dependency information; a module doesn't list it's dependencies in any form, causing frequently one to need to load a lot more code/data then required. Hi Paulo, Hi Rémi, Why not implement that instead? Sounds like reviving LinkKit will bring more cruft rather than clean up the current code... The amount of work for either should be similar, just that if you have a closed binary, it must have all symbols resolved. The cool thing about loadable modules would be to be able to switch/disable/enable input/video/etc modules on the fly, but this is not a reality, and requires restarting the X Server anyway... What's your ulterior motives with LinkKit anyway? Just curious :) None really, but maybe someone that worked on it is reading the lists and could also comment, or maybe some vague memory of transforming an unusable computer in one that could even run emacs (I used to use emacs to edit sources, read email, compile, debug, etc) :-) I just cited it because it used the concept I was thinking about, http://www.xfree.org/3.3.6/LinkKit1.html. Cheers, Rémi Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[ANNOUNCE] xf86-input-keyboard 1.3.2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam Jackson (2): Remove XFree86-Misc leftovers. Remove useless call to xf86AddModuleInfo Alan Coopersmith (2): sun_kbd.c: Don't try to repeat shutdown actions on already closed keyboard Renamed subdir .cvsignore files to .gitignore Kristian Høgsberg (1): Move atKeynames.h and xf86CommonSpecialKey() here. Luc Verhaegen (1): Set TERMINATE_FALLBACK to 0. Paulo Cesar Pereira de Andrade (1): Update for servers newer then 1.5 or git master. git tag: xf86-input-keyboard-1.3.2 http://xorg.freedesktop.org/archive/individual/driver/xf86-input-keyboard-1.3.2.tar.bz2 MD5: d6fe929c4f6085d6dd67f197ae9c42f6 xf86-input-keyboard-1.3.2.tar.bz2 SHA1: 81d35fedef7b809b35297935330ddc8743005512 xf86-input-keyboard-1.3.2.tar.bz2 http://xorg.freedesktop.org/archive/individual/driver/xf86-input-keyboard-1.3.2.tar.gz MD5: 7d1d00929e2929db9ade3b0844b70c68 xf86-input-keyboard-1.3.2.tar.gz SHA1: e208c1ef4e2cac8d29e0adb1f6fe3f1f5d332e50 xf86-input-keyboard-1.3.2.tar.gz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAklk46IACgkQPdKBRUa20MD3AgCfab2g46/F/wtVGrkh7MM1HnEm gVEAnRfHnz3qzf/LpEkv/Dmg7pJLmq7A =Jmpp -END PGP SIGNATURE- ___ xorg-announce mailing list xorg-announce@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg-announce
[ANNOUNCE] xf86-input-keyboard 1.3.2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam Jackson (2): Remove XFree86-Misc leftovers. Remove useless call to xf86AddModuleInfo Alan Coopersmith (2): sun_kbd.c: Don't try to repeat shutdown actions on already closed keyboard Renamed subdir .cvsignore files to .gitignore Kristian Høgsberg (1): Move atKeynames.h and xf86CommonSpecialKey() here. Luc Verhaegen (1): Set TERMINATE_FALLBACK to 0. Paulo Cesar Pereira de Andrade (1): Update for servers newer then 1.5 or git master. git tag: xf86-input-keyboard-1.3.2 http://xorg.freedesktop.org/archive/individual/driver/xf86-input-keyboard-1.3.2.tar.bz2 MD5: d6fe929c4f6085d6dd67f197ae9c42f6 xf86-input-keyboard-1.3.2.tar.bz2 SHA1: 81d35fedef7b809b35297935330ddc8743005512 xf86-input-keyboard-1.3.2.tar.bz2 http://xorg.freedesktop.org/archive/individual/driver/xf86-input-keyboard-1.3.2.tar.gz MD5: 7d1d00929e2929db9ade3b0844b70c68 xf86-input-keyboard-1.3.2.tar.gz SHA1: e208c1ef4e2cac8d29e0adb1f6fe3f1f5d332e50 xf86-input-keyboard-1.3.2.tar.gz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAklk46IACgkQPdKBRUa20MD3AgCfab2g46/F/wtVGrkh7MM1HnEm gVEAnRfHnz3qzf/LpEkv/Dmg7pJLmq7A =Jmpp -END PGP SIGNATURE- ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[PATCH] Default to use standard fonts and builtin fonts as a fallback
The attached patch changes the current XServer behaviour of using built-ins font by default only. But if the default font 'fixed' is not found, it will automatically default to use built-ins fonts. I believe this is a far more reasonable default, and still addresses the most common Xorg FAQ in the same way. Paulo From 9c4dae9a69d1bfc2613ecfdf29b57d9870af4bee Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Tue, 6 Jan 2009 15:07:57 -0200 Subject: [PATCH] Default to use standard fonts and builtin fonts as a fallback The builtin-fonts configure option was removed, as it at best should be a runtime option. Instead, if the XServer fails to load the default text font, fallback to use builtin fonts automatically. This should be a more reasonable solution, to correct the most common Xorg FAQ (could not open default font 'fixed'), and also don't break by default applications that use only the standard/historical X Font rendering. --- configure.ac |8 - dix/dixfonts.c |4 -- dix/main.c |8 - hw/xfree86/common/xf86Config.c | 67 include/dixfont.h |5 +++ 5 files changed, 39 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index 9161cba..7bc6e5e 100644 --- a/configure.ac +++ b/configure.ac @@ -507,9 +507,6 @@ AC_ARG_ENABLE(install-libxf86config, [Install libxf86config (default: disabled)]), [INSTALL_LIBXF86CONFIG=$enableval], [INSTALL_LIBXF86CONFIG=no]) -AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: yes)]), -[BUILTIN_FONTS=$enableval], -[BUILTIN_FONTS=yes]) AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) @@ -963,11 +960,6 @@ if test x$DPMSExtension = xyes; then AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi -if test x$BUILTIN_FONTS = xyes; then - AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts]) - FONTPATH=built-ins -fi - if test x$XCALIBRATE = xyes test $KDRIVE = yes; then AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) REQUIRED_MODULES=$REQUIRED_MODULES xcalibrateproto diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 15d011c..26ed89c 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1906,12 +1906,8 @@ InitFonts (void) { patternCache = MakeFontPatternCache(); -#ifdef BUILTIN_FONTS -BuiltinRegisterFpeFunctions(); -#else FontFileRegisterFpeFunctions(); fs_register_fpe_functions(); -#endif } int diff --git a/dix/main.c b/dix/main.c index 4a062b7..c001a4f 100644 --- a/dix/main.c +++ b/dix/main.c @@ -331,7 +331,13 @@ int main(int argc, char *argv[], char *envp[]) ErrorF([dix] failed to set default font path '%s', defaultFontPath); } if (!SetDefaultFont(defaultTextFont)) { - FatalError(could not open default font '%s', defaultTextFont); + LogMessage(X_WARNING, Default font '%s' not found. + Using builtin fonts.\n, defaultTextFont); + BuiltinRegisterFpeFunctions(); + defaultFontPath = built-ins; + if (SetDefaultFontPath(defaultFontPath) != Success || + !SetDefaultFont(defaultTextFont)) + FatalError(could not open default font '%s', defaultTextFont); } if (!(rootCursor = CreateRootCursor(NULL, 0))) { diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 48d8efd..9bf8dc1 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -610,17 +610,8 @@ configFiles(XF86ConfFilesPtr fileconf) } else { defaultFontPath = f; } - } else { - xf86Msg(X_WARNING, - FontPath is completely invalid. Using compiled-in default.\n); -fontPath = NULL; -pathFrom = X_DEFAULT; } } - } else { - xf86Msg(X_DEFAULT, - No FontPath specified. Using compiled-in default.\n); - pathFrom = X_DEFAULT; } } else { /* Use fontpath specified with '-fp' */ @@ -652,42 +643,38 @@ configFiles(XF86ConfFilesPtr fileconf) } } - /* If defaultFontPath is still empty, exit here */ - - if (! *defaultFontPath) -FatalError(No valid FontPath could be found.); - /* make fontpath more readable in the logfiles */ - countDirs = 1; - temp_path = defaultFontPath; - while((temp_path = index(temp_path, ',')) != NULL) { -countDirs++; -temp_path++; - } - log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); - if(!log_buf) /* fallback to old method */ -xf86Msg(pathFrom, FontPath set to \%s\\n, defaultFontPath); - else { -char *start, *end; -int size; -temp_path = log_buf; -start = defaultFontPath; -
[no subject]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Hourihane (1): silence warning Colin Harrison (1): include for sleep() James Cloos (1): Add missing PHONY line for automatic ChangeLog generation Matthieu Herrb (1): nuke RCS Ids Paulo Cesar Pereira de Andrade (1): Update .gitignore. Peter Breitenlohner (10): define macros to 1 in icetrans.c to avoid redefined macro warnings Constify some arguments in libICE to clear warnings in libSM use xorg-macros-1.2.1 Activate CWARNFLAGS with lots of gcc warnings towards ANSI C ANSI C Use NULL, not zero, for pointers use memcmp instead of binaryEqual remove ChangeLog from EXTRA_DIST and CLEANFILES bump to 1.0.5 git tag: libICE-1.0.5 http://xorg.freedesktop.org/archive/individual/lib/libICE-1.0.5.tar.bz2 MD5: ca1f9563a7cc5e8017de7221bdb2ade3 libICE-1.0.5.tar.bz2 SHA1: be6fb2a00f34689c16dad63e1ad36896f5efd7d2 libICE-1.0.5.tar.bz2 http://xorg.freedesktop.org/archive/individual/lib/libICE-1.0.5.tar.gz MD5: 67334bd681a42209082f4c0180bd253d libICE-1.0.5.tar.gz SHA1: 8e59e4c152aa0aeed17fb9c782870077ab74e689 libICE-1.0.5.tar.gz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkljsbEACgkQPdKBRUa20MD8twCfV8F0ONS9NfsMCvBeTU+8iEo1 7twAnA1G/V0fm9b3G8l/dn6ANfSPoIAz =2Qzu -END PGP SIGNATURE- ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [should have been: ANNOUNCE: libICE 1.0.5]
Oops, forgot a small detail :-) xorg-announce moderator(s), please correct it when allowing it to go to @xorg-announce Thanks, Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Default to use standard fonts and builtin fonts as a fallback
James Cloos wrote: +1 on concept. I know some dists are using a simple patch such as: diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 416adb3..719bca4 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1907,12 +1907,9 @@ InitFonts (void) { patternCache = MakeFontPatternCache(); -#ifdef BUILTIN_FONTS BuiltinRegisterFpeFunctions(); -#else FontFileRegisterFpeFunctions(); fs_register_fpe_functions(); -#endif } int A more complete patch is warranted, but perhaps just forcing built-ins as the last entry of the fontpath is sufficient? You are right. I only really tried to understand the logic behind it today, and made a quick patch. I will try another simpler patch, pseudo code: dix/main.c:main.c() ... InitFonts(); +str = strstr(built-ins, defaultFontPath); +end = str + strlen(built-ins); +if (str == null || +((str != defaultFontPath || str[-1] != ',') + (!*end || *end != ','))) +defaultFontPath = Xprintf(%s%sbuilt-ins, defaultFontPath, + *defaultFontPath ? , : ); if (SetDefaultFontPath(defaultFontPath) != Success) { ... Will send a new version in a few minutes if it passes the test cases. The other patch has a big problem, that if the default font is not found, but a proper font path is already set, it will disable the proper one... -JimC -- James Cloos cl...@jhcloos.com OpenPGP: 1024D/ED7DAEA6 Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Default to use standard fonts and builtin fonts as a fallback
Paulo César Pereira de Andrade wrote: [...] A more complete patch is warranted, but perhaps just forcing built-ins as the last entry of the fontpath is sufficient? Updated, simpler and more reliable, patch attached. (patch name also change) Sorry for replying myself (twice). There is a small bug in the patch (consider it an exercise for the careful patch reviewer :-). The proper patch is s/temp_path != defaultFontPath/temp_path == defaultFontPath/ It could also be simplified to always add built-ins at the end of defaultFontPath, but better to check, to have a properly formated log message without possibly duplicated entries. The constructs *possibly_null+n and foo = function(foo) are correct and reliable C code (as possibly_null is not deferenced if it is null), but it can also be modified to use temporary variables and/or if blocks for easier reading. It also assumes defaultFontPath is never NULL, what is currently true, but code semantic may change in the future. Functions of libXfont without an installed header file probably should be added to some *priv.h header, instead of having prototypes in either .c or XServer sdk headers. This is not the only case, but maybe defaultFontPath initialization should be something like: defaultFontPath = xstrdup(define_value); and defaultFontPath = xstrdup(argv[i]); so that it could be safely free'd before assigning a new value, otherwise you need to live with these small leaks. (self advertising: I have an unfinished project, using a specialized, C like language, that generates C source code as output, and handles these kinds of things by using a garbage collector, runtime type and object size information, bounds checking, etc...). Thanks for reading, Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [Cooker] x3270 fonts
feretio wrote: Cavassin has told me that Paulo has suggested you something related to configure's options. In my research, I think that might be the case. I believe the following was referred to: configure --disable-builtin-fonts Yes, I think Colin missed my email about it. But I said him to use that option to avoid having angry emacs users hating him, or something like that :-) I am using XServer and libraries built from git master in the computers I use actively, and did not notice the problem in cooker... I believe this should be a X Server command line option, instead of a compile time switch. The hadcoded code is: dix/dixfonts.c: void InitFonts (void) { patternCache = MakeFontPatternCache(); #ifdef BUILTIN_FONTS BuiltinRegisterFpeFunctions(); #else FontFileRegisterFpeFunctions(); fs_register_fpe_functions(); #endif } and BUILTIN_FONTS is defined by default, and when it is defined, only the fixed font will be available. But there are still several applications that were not updated to use Xft, and require more then just fixed... Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xserver distribution missing sdksyms.sh
vehemens wrote: subject says it all Thanks. I feel dumb for this one :-) Last time I run make distcheck was like one month ago, when I added DISTCLEANFILES = doltcompile doltlibtool to the toplevel Makefile.am Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] fix sdksyms for gcc3
Matthieu Herrb wrote: gcc 3.3 (at least) doesn't support visibility attributes, so _X_EXPORT expands to nothing. This breaks the awk script embedded in hw/xfree86/loader/sdksyms.sh that expects that an extern function declaration to be in the form extern __attribute__(___something___) type ... With the attached patch sdksyms.sh works with gcc 3.3 too. Thanks. I thought I had already tested this case. But I cannot guarantee the problem was not caused by recent changes to sdk headers. I will check carefully again. In the meantime, feel free to apply the patch :-) I don't want to have it in any intrusive or hard to understand way. But to allow easier handling by automated tools, the syntax for symbols that should be available to modules is: extern _X_EXPORT type-specoptional-newline symbol-name ignored... One option that I considered was to use linux kernel format, that is, something like: EXPORT_SYMBOL(symbol_name); written in the C sources. This has the advantage of a more clear way to handle what should be done inside the macro expansion, while the format used in the Xorg sdk requires a tool to parse the headers (what can cause problems if the parser doesn't understand the specification). But the format in the sdk headers was also preferred to attempt to reduce the amount of patches, and keep the sources with free definition of symbols from macro expansions. The real problem with sdksyms.* is that it is trying to resolve a problem that should not exist in the first place. If the symbols are not referenced, the linker will not add unreachable symbols to the Xorg binary. The problem is that the symbols dropped are only reachable from loadable modules. The proper solution should be either have the Xorg binary actually reference those symbols, or have them in separate modules, or possibly have then in a shared library... Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xserver: Branch 'master'
Matthieu Herrb wrote: Paulo Cesar Pereira de Andrade wrote: hw/xfree86/loader/Makefile.am |6 -- hw/xfree86/loader/sdksyms.sh | 13 + 2 files changed, 17 insertions(+), 2 deletions(-) New commits: commit 86dc660588a615baefb1799d78a501c95a931d77 Author: Paulo Cesar Pereira de Andrade p...@mandriva.com.br Date: Tue Dec 23 18:07:54 2008 -0200 Improve sdksyms.c automatic generation (Fix #19245). Since it is already parsing cpp output, create a dependency file in the same process. This will cause sdksyms.c to be regenerated whenever a sdk header is modified. This also uses the gmake 'sinclude' directive (don't fail if included file doesn't exist). This should not cause any problems given that gmake only constructs are used in several other Makefiles. Sorry no, so far I was able to use bmake (BSD make) for all X.Org modules. What other Makefiles are using GNU make constructs? Thanks for the information. I was afraid it could not work correctly with Solaris or BSD make, given the large amount of problems to write a small awk script that works everywhere... But the feature, as noted in info make is from SGI make (and perhaps others), and the other alternative is from SunOS 4. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[ANNOUNCE] xf86-video-siliconmotion 1.7.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xorg SiliconMotion Video Driver 1.7.0 features include support for SMI 50x chipsets, RandR 1.2, EXA acceleration Method, Dual Head, etc. Special thanks to Teddy Wang teddy.wang AT siliconmotion.com.cn for support and help in responding and/or triaging hardware related questions. ChangeLog: - Adam Jackson (1): Dead code removal. Arnaud Patard (1): Correct a problem when handling i420 format. Francisco Jerez (28): Memory detection moved before memory mapping in SMI_PreInit. Make the int10/VBE initialization depend on the UseBIOS configuration option. Updates in SMI_EnterVT when remapping memory. RandR rotation implemented. Some fixes in the EXA UTS/DTS code. Allow using XV and RandR rotation simultaneously. Fix XAA, ShadowFB and VT switching for non-sm501 chipsets RandR1.2 initial implementation (WIP) Some corrections in the CRTC code. Simple EXA Composite implementation. Changes in the video overlay clipping code. Lynx hardware cursor code adapted to the CRTC interfaces. Remove shadowfb based rotation support. Update the man page Remove unused fifo_* options. Disable screen centering on mode initialization. Some corrections on the Lynx modesetting code. Fix XAA SolidFill with 32 bpp framebuffer. Fall back to UseBIOS off when VBEInit fails. Enable linear memory mode on SMI_MapMmio. Fix crashes when switching VTs with EXA enabled. Add some quirks for SM712 modesetting. Cleanup the Lynx register saving/restoring code. Allocate crtc-funcs and output-funcs in the heap. Fix SMI_CrtcShadowAllocate. Add a CRTC/Output implementation using BIOS for modesetting. Add support for clone mode on Lynx chipsets. Some more quirks for the SM712. Nathael Pajani (1): Bit twelve on CPR00 bitfield is not bit eleven... Paulo Cesar Pereira de Andrade (92): Fix build for removal of xf86Version.h Add initial support and macros for the MSOC. Change SILICONMOTION_NAME value Add code to probe and recognize the SMI501 chipset MSOC doesn't access VGA registers or VBE/INT10 Update xaa and generic acceleration code for the MSOC. Update MSOC video interface. Bump version to 1.6.1. Split SMI_MapMem in SMI_MapMem and SMI_MapMmio Don't pretend this driver compiles on XFree86. Correct xv video problems on MSOC. Correct all compiler warning messages. Rename global smi501 functions to have SMI501 prefix. Complete rewrite of smi_501.c and smi_501.h. Update for new smi_501 interfaces. Correct video offscreen memory allocation routines. Add a missing CHECK_SECONDARY macro call. Add initial exa support for SMI501. Enable pci retry and pci burst by default. Add MSOC palette support to run at 8 bpp. Kludge to not lock the SMI 501 when running at 8bpp. Fix a leak and minor cosmetic change. Rework/simplify debug macros. Simplify hw cursor and sw cursor option handling. Remove unused .cvsignore files. Split SMI501_ModeInit in two functions. Correct logic in sw cursor handling and add missing entries to .gitignore. Correct problems in clock setting. Fix incorrect understanding of the pixel clock from specs. Don't try to find the closest clock, just use highest one. Properly check pScrn-driverPrivate before deferencing it. Don't always program CRT clock and registers. Update to match the SMI 502 chipset specs. Remove the macro field, and rename the detail structure to f. Correct clock programming for the SMI 501/502 Add support for the extra divider in the alternate pixel clock setting. Rewrite some macros to not have side effects in if/else nesting. Remove the IN_SEQ and OUT_SEQ macros. Rename macro bitfield to bits and correct a wrong division. Simplify regsmi.h by removing most unused SMI501 defines. Don't use the 1 multiplier on older chipsets. Rewrite WaitQueue and WaitIdle accell macros Make the input frequency in SMI501_FindPLLClock a variable Add a PanelSize/60Hz CVT mode at driver initialization Minor corrections for smi501 for the randr1.2 integration. Remove dependency on xf86cvt.c. Extra MSOC tweaks for the RandR1.2 changes. Correct incorrect pll3 calculation. Revert/modify some RandR changes to reenable XAA. Update sm502 pll3 programming. Don't change M1XCLK unless option specified in xorg.conf. Crt interface corrections. Use existing Dualhead option in MSOC. Make UseFBDev option functional again. Make Dualhead option functional. Update msoc to use randr cursor routines SMI501/502 cursor fixes.
[ANNOUNCE] xf86-video-siliconmotion 1.7.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xorg SiliconMotion Video Driver 1.7.0 features include support for SMI 50x chipsets, RandR 1.2, EXA acceleration Method, Dual Head, etc. Special thanks to Teddy Wang teddy.wang AT siliconmotion.com.cn for support and help in responding and/or triaging hardware related questions. ChangeLog: - Adam Jackson (1): Dead code removal. Arnaud Patard (1): Correct a problem when handling i420 format. Francisco Jerez (28): Memory detection moved before memory mapping in SMI_PreInit. Make the int10/VBE initialization depend on the UseBIOS configuration option. Updates in SMI_EnterVT when remapping memory. RandR rotation implemented. Some fixes in the EXA UTS/DTS code. Allow using XV and RandR rotation simultaneously. Fix XAA, ShadowFB and VT switching for non-sm501 chipsets RandR1.2 initial implementation (WIP) Some corrections in the CRTC code. Simple EXA Composite implementation. Changes in the video overlay clipping code. Lynx hardware cursor code adapted to the CRTC interfaces. Remove shadowfb based rotation support. Update the man page Remove unused fifo_* options. Disable screen centering on mode initialization. Some corrections on the Lynx modesetting code. Fix XAA SolidFill with 32 bpp framebuffer. Fall back to UseBIOS off when VBEInit fails. Enable linear memory mode on SMI_MapMmio. Fix crashes when switching VTs with EXA enabled. Add some quirks for SM712 modesetting. Cleanup the Lynx register saving/restoring code. Allocate crtc-funcs and output-funcs in the heap. Fix SMI_CrtcShadowAllocate. Add a CRTC/Output implementation using BIOS for modesetting. Add support for clone mode on Lynx chipsets. Some more quirks for the SM712. Nathael Pajani (1): Bit twelve on CPR00 bitfield is not bit eleven... Paulo Cesar Pereira de Andrade (92): Fix build for removal of xf86Version.h Add initial support and macros for the MSOC. Change SILICONMOTION_NAME value Add code to probe and recognize the SMI501 chipset MSOC doesn't access VGA registers or VBE/INT10 Update xaa and generic acceleration code for the MSOC. Update MSOC video interface. Bump version to 1.6.1. Split SMI_MapMem in SMI_MapMem and SMI_MapMmio Don't pretend this driver compiles on XFree86. Correct xv video problems on MSOC. Correct all compiler warning messages. Rename global smi501 functions to have SMI501 prefix. Complete rewrite of smi_501.c and smi_501.h. Update for new smi_501 interfaces. Correct video offscreen memory allocation routines. Add a missing CHECK_SECONDARY macro call. Add initial exa support for SMI501. Enable pci retry and pci burst by default. Add MSOC palette support to run at 8 bpp. Kludge to not lock the SMI 501 when running at 8bpp. Fix a leak and minor cosmetic change. Rework/simplify debug macros. Simplify hw cursor and sw cursor option handling. Remove unused .cvsignore files. Split SMI501_ModeInit in two functions. Correct logic in sw cursor handling and add missing entries to .gitignore. Correct problems in clock setting. Fix incorrect understanding of the pixel clock from specs. Don't try to find the closest clock, just use highest one. Properly check pScrn-driverPrivate before deferencing it. Don't always program CRT clock and registers. Update to match the SMI 502 chipset specs. Remove the macro field, and rename the detail structure to f. Correct clock programming for the SMI 501/502 Add support for the extra divider in the alternate pixel clock setting. Rewrite some macros to not have side effects in if/else nesting. Remove the IN_SEQ and OUT_SEQ macros. Rename macro bitfield to bits and correct a wrong division. Simplify regsmi.h by removing most unused SMI501 defines. Don't use the 1 multiplier on older chipsets. Rewrite WaitQueue and WaitIdle accell macros Make the input frequency in SMI501_FindPLLClock a variable Add a PanelSize/60Hz CVT mode at driver initialization Minor corrections for smi501 for the randr1.2 integration. Remove dependency on xf86cvt.c. Extra MSOC tweaks for the RandR1.2 changes. Correct incorrect pll3 calculation. Revert/modify some RandR changes to reenable XAA. Update sm502 pll3 programming. Don't change M1XCLK unless option specified in xorg.conf. Crt interface corrections. Use existing Dualhead option in MSOC. Make UseFBDev option functional again. Make Dualhead option functional. Update msoc to use randr cursor routines SMI501/502 cursor fixes.
Re: [PATCH] Include sdk header dependencies and protect agains't multiple inclusion.
Eric Anholt wrote: Hi, The attached patch is the result of as few extra inclusions as possible, by creating a dummy file including just that header, and making it compile. This was done in the loader directory, and I added some extra -I for module headers, but including in the build tree. This seems like a bunch of churn for something that's not actually broken. Sorry, did not understand that phrase, and google translation was not much helpful. But I feel you were not saying how much you loves me :-) The patch as a whole may not be required to apply, and not that patch verbatim, as it would require still at least a review to ensure every sdk header passes the: ifdef HAVE_FOO_CONFIG_H #include foo-config.h #endif when it is applicable. But always including it would not really be a problem, just that those bits are only required before installing the headers, i.e. in the X Server build. To apply a minimal amount of the patch, it would be required to just add the proper #ifndef FOO_H #define FOO_H file-contents #endif /* FOO_H */ to the headers that don't guard agains't multiple inclusion. And a more complete work is to only define in sdk headers those symbols that should not be available to drivers. Anyway, the current code is ok, and should require minimal maintenance work to compile the X Server and modules with hidden symbols by default (most of it is just changing a header instead of hunting symbols in the C sources, that have theirs names frequently generated after macro expansions...). Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server exported symbols broken
Peter Hutterer wrote: I just wasted quite some time to get master to actually start. Unresolved symbols all over the place, both with intel and with vesa. Vesa had xf86InterpretEDID, intel had three or four different ones (miPolyRectangle was one of them IIRC). Rebuilding with and without --enable/disable-visibility didn't change anything. I found the problem. Ubuntu (Hardy) installs mawk as default awk process, and mawk can't deal with the /^extern[[:space:]]/ line in the sdksym.sh script, so the symbol table is always empty. Installing gawk fixes the problem. I'm not sure if that still affects newer Ubuntu versions, but maybe we can put a check in for that? And I did not write it in perl to avoid people willing to convert it to awk, telling awk is more portable/reliable :-) The attached patch works with gawk and mawk. I don't have access to a BSD or Solaris Xorg build right now, but I believe it should also work with posix awk. Can someone confirm please? It could also be a good idea toadd a small set of hardcoded symbols in the template sdksyms.c, so that the linker would link all symbols. The previous *sym.c files were very outdated, but still, referenced enough symbols to prevent this problem... Cheers, Peter Paulo diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index b522096..a3b6772 100755 --- a/hw/xfree86/loader/sdksyms.sh +++ b/hw/xfree86/loader/sdksyms.sh @@ -333,7 +333,7 @@ BEGIN { sdk = $3 !~ /^\//; } -/^extern[[:space:]]/ { +/^extern[ ]/ { if (sdk) { n = 3; @@ -347,17 +347,17 @@ BEGIN { # type specifier may not be set, as in # extern _X_EXPORT unsigned name(...) - if ($n !~ /[^[:alnum:]_]/) + if ($n !~ /[^a-zA-Z0-9_]/) n++; # match #extern _X_EXPORT type (* name[])(...) - if ($n ~ /^[^[:alnum:]_]+$/) + if ($n ~ /^[^a-zA-Z0-9_]+$/) n++; # match # extern _X_EXPORT const name *const ... - if ($n ~ /^([^[:alnum:]_]+)?const$/) + if ($n ~ /^([^a-zA-Z0-9_]+)?const$/) n++; # actual name may be in the next line, as in @@ -373,10 +373,10 @@ BEGIN { symbol = $n; # remove starting non word chars - sub(/^[^[:alnum:]_]+/, ,symbol); + sub(/^[^a-zA-Z0-9_]+/, ,symbol); # remove from first non word to end of line - sub(/[^[:alnum:]_].*/, , symbol); + sub(/[^a-zA-Z0-9_].*/, , symbol); #print; printf(%s,\n, symbol);___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server exported symbols broken
Peter Hutterer wrote: Paulo, Hi Peter, I just wasted quite some time to get master to actually start. Unresolved symbols all over the place, both with intel and with vesa. Vesa had xf86InterpretEDID, intel had three or four different ones (miPolyRectangle was one of them IIRC). Rebuilding with and without --enable/disable-visibility didn't change anything. Sorry for that problem. I pushed a new commit that should correct this problem. The symbol table is required, because when linking a binary, the linker may choose to drop dead code, that is, code unreachable. I will do some tests with some libtool options, but afaik there is no way to make it not drop the symbols in the current schema; linking a dummy binary with a libxserver.so should work, but that probably isn't a good idea. Reverting all your patches up to 7c16f612dddc11ed18296609365ec4b6ffe61678 finally fixed this, so I presume it has to do with the autogenerated symbol table. Please fix this. I changed the script to check for the dirname of the header being processed also, instead of only checking if the path is relative. Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[PATCH] Include sdk header dependencies and protect agains't multiple inclusion.
Hi, The attached patch is the result of as few extra inclusions as possible, by creating a dummy file including just that header, and making it compile. This was done in the loader directory, and I added some extra -I for module headers, but including in the build tree. I would like some feedback on if it would be correct to, check in the build directory of the header if AM_CFLAGS is defined somewhat like: AM_CFLAGS = $(DIX_CFLAGS) ... and in that case, ensure the header either itself does: #ifdef HAVE_DIX_CONFIG_H #include dix-config.h #endif or include a header that has that in the start. There are also several different styles for the sequence #ifndef HEADER_H #define HEADER_H ... #endif /* HEADER_H */ I used the _HEADER_H_ stype for headers without multiple inclusion protection, as it appears to be the most common, but without start/ending underlines is also very common. Maybe a common style should be used ? Also, another question is about the generation of the file sdksyms.c. What would be the better approach to have a Makefile rule to regenerate sdksyms.c if sdksyms.o needs to be regenerated due to a header being updated? Paulo From cfb29abf144380a45eefd03fa5a80fa5c19cfe84 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade [EMAIL PROTECTED] Date: Thu, 11 Dec 2008 04:02:44 -0200 Subject: [PATCH] Include sdk header dependencies and protect agains't multiple inclusion. --- Xext/geext.h|3 +++ Xext/panoramiX.h|2 +- Xext/shmint.h |1 + dbe/dbestruct.h |3 ++- fb/fboverlay.h |2 +- fb/fbrop.h |2 ++ fb/wfbrename.h |5 + hw/xfree86/common/vidmodeproc.h |3 ++- hw/xfree86/common/xf86Opt.h |3 +++ hw/xfree86/common/xisb.h|1 + hw/xfree86/ddc/edid.h |5 ++--- hw/xfree86/dixmods/extmod/dgaproc.h |1 + hw/xfree86/dri/dri.h|5 ++--- hw/xfree86/dri2/dri2.h |2 ++ hw/xfree86/modes/xf86RandR12.h |1 + hw/xfree86/os-support/solaris/agpgart.h |2 ++ hw/xfree86/ramdac/BT.h |4 hw/xfree86/ramdac/IBM.h |4 hw/xfree86/ramdac/TI.h |4 hw/xfree86/vbe/vbeModes.h |5 - hw/xfree86/xaa/xaaWrapper.h |2 ++ hw/xfree86/xaa/xaarop.h |2 ++ include/XIstubs.h |3 +++ include/closestr.h |1 + include/dix.h |2 ++ include/dixevents.h |3 +++ include/dixgrabs.h |3 +++ include/exevents.h |1 + include/extension.h |2 ++ include/hotplug.h |2 ++ include/misc.h |1 + include/swaprep.h |2 ++ include/swapreq.h |2 ++ include/xkbfile.h |3 +++ include/xkbrules.h |2 ++ include/xkbstr.h|1 + mi/mifillarc.h |2 ++ mi/mifpoly.h|2 +- mi/migc.h |6 ++ mi/miline.h |1 + mi/mioverlay.h |4 mi/mispans.h|4 mi/miwideline.h |4 mi/mizerarc.h |6 ++ miext/damage/damage.h |3 +++ render/glyphstr.h |3 ++- render/picturestr.h |1 + render/renderedge.h |1 + xfixes/xfixes.h |1 + 49 files changed, 115 insertions(+), 13 deletions(-) diff --git a/Xext/geext.h b/Xext/geext.h index 3074431..37adebb 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -32,6 +32,9 @@ from the author. #ifndef _GEEXT_H_ #define _GEEXT_H_ + +#include input.h + #include X11/extensions/geproto.h diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h index 89c7547..4e9154f 100644 --- a/Xext/panoramiX.h +++ b/Xext/panoramiX.h @@ -40,8 +40,8 @@ Equipment Corporation. #ifndef _PANORAMIX_H_ #define _PANORAMIX_H_ -#include X11/extensions/panoramiXext.h #include gcstruct.h +#include X11/extensions/panoramiXext.h typedef struct _PanoramiXData { diff --git a/Xext/shmint.h b/Xext/shmint.h index ec1688d..4b25282 100644 --- a/Xext/shmint.h +++ b/Xext/shmint.h @@ -29,6 +29,7 @@ #include screenint.h #include pixmap.h #include gc.h +#include resource.h extern _X_EXPORT void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h index e067f37..db9d184 100644 --- a/dbe/dbestruct.h
Re: [PATCH] Xext: un-export all XGE functions.
These functions are only to be used by X server extensions, so let's not expose them to the world. This will not work as expected if the X Server is compiled with hidden symbols. For the moment at least, it must be specified as both extern _X_EXPORT (what may be counter intuitive I agree). If no modules are going to access these symbols, then they should really be declared in a non sdk header. Using extern will just cause the sdksyms.sh script to add the symbol address to a vector (to ensure it exists), but without effect, as it is not being exported. Signed-off-by: Peter Hutterer [EMAIL PROTECTED] --- Xext/geext.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Xext/geext.h b/Xext/geext.h index 3074431..4d2acaf 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -66,7 +66,7 @@ typedef struct _GEExtension { /* All registered extensions and their handling functions. */ -extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS]; +extern GEExtension GEExtensions[MAXEXTENSIONS]; /* Returns the extension offset from the event */ #define GEEXT(ev) (((xGenericEvent*)(ev))-extension) @@ -95,20 +95,20 @@ extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS]; /* Interface for other extensions */ -extern _X_EXPORT void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, +extern void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, WindowPtr pWin, int extension, Mask mask); -extern _X_EXPORT void GERegisterExtension( +extern void GERegisterExtension( int extension, void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to), void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, WindowPtr pWin, GrabPtr pGrab) ); -extern _X_EXPORT void GEInitEvent(xGenericEvent* ev, int extension); -extern _X_EXPORT BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, +extern void GEInitEvent(xGenericEvent* ev, int extension); +extern BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, int extension, Mask mask); -extern _X_EXPORT void GEExtensionInit(void); +extern void GEExtensionInit(void); #endif /* _GEEXT_H_ */ -- 1.6.0.4 Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Xext: un-export all XGE functions.
Peter Hutterer wrote: On Mon, Dec 08, 2008 at 07:09:13PM -0200, Paulo César Pereira de Andrade wrote: These functions are only to be used by X server extensions, so let's not expose them to the world. This will not work as expected if the X Server is compiled with hidden symbols. For the moment at least, it must be specified as both extern _X_EXPORT (what may be counter intuitive I agree). If the X Server is compiled with hidden symbols, and those symbols are accessed by non builtin modules, they must be exported. Can you please summarize what the purpose of _X_EXPORT, _X_HIDDEN and _X_INTERNAL is now, and how the are supposed to be used? I think I did not express myself correctly. The usage has not changed. But to make things more manageable I am trying to keep the _X_EXPORT set on the header files. This mainly because there are several symbols that are expanded from macros, and are not easy to find or figure out what name they will have... _X_INTERNAL must be used with care, as described in the gcc info, symbols with this attribute cannot be accessed indirectly (using pointers) by other shared objects. _X_EXPORT is still used in sources for symbols accessed via LoaderSymbol, like the nameModuleData structures, and a few other cases where the function for sure should not be declared in the sdk. There are two kinds of symbols that must be made available by the X Server. That are the symbols that must be made available to video and input modules, and symbols that should be accessed only by modules built in the X Server tree. The procedure should be the same in the header file, just that the header would not be installed in the sdk. I will try to do as small as possible reorganization on the sdk headers, and add private and not installed headers. Drivers should not have access to functions to manage clients, call the *Init functions, and the like. But it may cause some regressions... (before pushing I would ensure everything builds and works for me, and test with a few different setups). I only skimmed your patches and that area was always a bit unclear to me anyway. Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[RFC] Xorg symbols that should not be public
Hi, In my Linux x86 computer, using only git master, and with X Server configured with --prefix=/usr --disable-builtin-fonts --enable-dri2 --enable-dri --enable-xephyr With all buildable modules also installed, attached is the list of symbols that are not used by any module. There are 2 main kinds of symbols that should be public: o Symbols accessed by input/video modules o Symbols accessed by extensions or other kind of modules And of course, there is a large amount of symbols in the list that should not be exported. And some should have a stub when some feature is disabled. I think some private headers, for things like libextmod, libxaa, libfb, etc, should be created, still with symbols exported at first, to guarantee binary compatibility. But some symbols that are currently exported should be made private, and not advertised in the sdk, as they are only used in the X Server binary. Paulo F AbortDDX F acceleratePointerLightweight F acceleratePointerPredictable F AccelerationDefaultCleanup F AccessUsingXdmcp F AccessXCancelRepeatKey F AccessXComputeCurveFactor F AccessXFilterPressEvent F AccessXFilterReleaseEvent F AccessXInit F ActivateDevice F ActivateKeyboardGrab F ActivatePointerGrab F AddAuthorization F AddExtensionClient F AddGeneralSocket F AddGlyph F AddHost F AddInputDevice F AddLocalHosts F AddOtherInputDevices F AddPassiveGrabToList F AddScreen F AddTraps F AllModifierKeysAreUp F AllocARGBCursor F AllocateGlyph F AllocateGlyphHash F AllocateGlyphSet F AllocateMotionHistory F AllocColor F AllocColorCells F AllocColorPlanes F AllocGlyphCursor F AllocMasterDevice F AllowSome F AlterSaveSetForClient F AnimCurInit F AnimCursorCreate F AssignTypeAndName F AtomError F AttachDevice F AuditF F AugmentSelf F AuthorizationFromID F AuthorizationIDOfClient F AutoResetServer F BadDeviceMap F BlockHandler F BTramdacRestore F BTramdacSave F BTramdacSetBpp F CallCallbacks F ChangeAccessControl F ChangeDeviceControl F ChangeKeyMapping F ChangePicture F ChangeWindowDeviceCursor F CheckAuthorization F CheckConnections F CheckCursorConfinement F CheckDeviceGrabAndHintWindow F CheckDeviceGrabs F CheckMotion F CheckUserAuthorization F CheckUserParameters F CirculateWindow F client_auth_generation F ClientAuthorized F ClientIsAsleep F ClientSignal F ClientSleep F ClientWakeup F CloseDownClient F CloseDownConnection F CloseDownDevices F CloseDownEvents F CloseDownExtensions F CloseFont F CloseInputDevice F CloseWellKnownConnections F CompareISOLatin1Lowered F CompositeGlyphs F CompositeRects F CompositeTrapezoids F CompositeTriangles F CompositeTriFan F CompositeTriStrip F config_fini F config_init F ConfigureWindow F ConfineToShape F CopyColormapAndFree F CopyISOLatin1Lowered F CopySwap16Write F CopySwap32Write F CoreProcessKeyboardEvent F CoreProcessPointerEvent F CreateBoundingShape F CreateClassesChangedEvent F CreateClipShape F CreateColormap F CreateConicalGradientPicture F CreateDefaultStipple F CreateGCperDepth F CreateGrab F CreateLinearGradientPicture F CreateNewResourceClass F CreateRadialGradientPicture F CreateRootCursor F CreateRootWindow F CreateScratchPixmapsForScreen F CreateSolidPicture F CreateWellKnownSockets F CursorMetricsFromGlyph F DamageDrawInternal F DamageRegionRendered F DamageSetPostRenderingFunctions F DamageSubtract F ddxGiveUp F ddxProcessArgument F DDXRingBell F ddxUseMsg F DeactivateKeyboardGrab F DeactivatePointerGrab F DeepCopyDeviceClasses F DefineInitialRootWindow F DefineSelf F DeleteAllWindowProperties F DeleteCallbackList F DeleteClientFontStuff F DeleteClientFromAnySelections F DeleteFontClientID F DeleteGlyph F DeleteInputDeviceRequest F DeletePassiveGrab F DeletePassiveGrabFromList F DeleteProperty F DeleteWindow F DeleteWindowFromAnyEvents F DeleteWindowFromAnyExtEvents F DeleteWindowFromAnySaveSet F DeleteWindowFromAnySelections F DeliverDeviceEvents F DeliverEvents F DeliverEventsToWindow F DeliverFocusedEvent F DeliverGrabbedEvent F DestroySubwindows F DevHasCursor F DeviceEventSuppressForWindow F DeviceFocusEvent F DeviceIsPointerType F DGAIsDgaEvent F DGAReInitModes F DGAShutdown F DGAStealButtonEvent F DGAStealKeyEvent F DGAStealMotionEvent F DGAVTSwitch F DisableLocalHost F DisableMapUnmapEvents F dixChangeWindowProperty F dixDestroyPixmap F dixLookupClient F dixLookupDevice F dixLookupPrivateAddr F dixLookupPrivateOffset F dixLookupProperty F dixLookupSelection F dixRegisterPrivateDeleteFunc F dixRegisterPrivateInitFunc F dixResetPrivates F dixResetRegistry F DoConfigure F DoFocusEvents F doImageText F doListFontsWithInfo F doPolyText F DoShowOptions F DPMSGet F DPMSSupported F EnableDevice F EnableDisableExtension F EnableDisableExtensionError F EnableLocalHost F EnableMapUnmapEvents F EnqueueEvent F EstablishNewConnections F EventMaskForClient F EventSelectForWindow F EventSuppressForWindow F ExtGrabDevice F FakeAllocColor F FakeFreeColor F Fclose F FindColor F FindGlyph F FindGlyphByHash F FindGlyphHashSet F FindGlyphRef F find_old_font F
Re: [RFC] Xorg symbols that should not be public
Aaron Plattner wrote: I think some private headers, for things like libextmod, libxaa, libfb, etc, should be created, still with symbols exported at first, to guarantee binary compatibility. But some symbols that are currently exported should be made private, and not advertised in the sdk, as they are only used in the X Server binary. Hi Paulo, Hi Aaron, Can you test with a install of the current X Server git master, and check what symbols are missing if any? Just use the script attached. I remember last year/start of this year, when I check, the nvidia driver required miInitializeCompositeWrapper (don't remember if any other symbols). Currently that function is not in the sdk, and the apparently only user, libxaa has it as a hidden symbol, what probably is wrong. libwfb may also need some update, wfbrename.h maybe should not be installed, but I don't remember if the nvidia driver used it. xf86Rename.h probably should not be in the sdk, but bundled with the drivers that provide fallbacks for older servers. Of these, we need the following: LoaderGetABIVersion LoaderShouldIgnoreABI miCreateAlphaPicture noRenderExtension PictureMatchVisual xf86AddGeneralHandler xf86DeregisterStateChangeNotificationCallback xf86DisableGeneralHandler xf86EnableGeneralHandler xf86RemoveGeneralHandler XineramaVisualsEqualPtr I think all of these should always be available. And if one compiles with --disable-xinerama, the xinerama function should not be called. Paulo xorg-symbols.pl Description: Perl program ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Ansification of X.Org code: A question how to proceed
Hi Peter, In general, I think everyone agrees conversion of the remaining bits of code that use KR/pre-ANSI-C89 style function prototypes declarations to C89 is a good thing (provided it's done correctly [1]), [1] http://invisible-island.net/ansification/index.html Hi Alan, Adam, Julien, Paulo, now with xorg-macros-1.2 available, I have prepared patches to convert libICE and libSM to strict ANSI C as follows: (1) use xorg-macros-1.2 Use XORG_CHANGELOG for rule to generate ChangeLog from git log Use XORG_CWARNFLAGS for compiler warning flags, leave CFLAGS to user (2) Activate CWARNFLAGS with lots of gcc warnings (3) towards ANSI C make default error handlers and some others static (4) ANSI C convert all old style function declarations == This should then enable and yet avoid `all' compiler (gcc) warnings == The problem is however, that libSM uses _IcePoMagicCookie1Proc and _IcePaMagicCookie1Proc from libSM, but at present they are not declared in an installed header. A similar problem occurs with SnfSetFormat used by app/xfs and declared (but not exported) in libXfont/src/bitmap/snfstr.h I see two possibilities: (A) Declare _IceP[ao]MagicCookie1Proc in the libICE internal header ICElibint.h and repeat (copy) the declaration in libSM, analogous to Paulo's http://bugs.freedesktop.org/show_bug.cgi?id=15082 http://bugs.freedesktop.org/attachment.cgi?id=15213 for SnfSetFormat and xfs This is arguably the worst option :-) Actually, prototypes declared in C sources should be moved to the proper headers. (B) Declare _IceP[ao]MagicCookie1Proc in X11/ICE/ICEmsg.h, bump libICE to 1.0.5, and require 'ice =1.0.5' for libSM X11/ICE/ICEmsg.h contains already prototypes for lots of libICE internal functions _Ice*(). This is I believe, the best option. And while at it, change the calls to iceauth.c:binaryEqual() to memcmp() (or maybe it is done that way to avoid someone somehow LD_PRELOAD'ing memcp ?, but then, one could just LD_PRELOAD libICE ...) (C) There is actually a third possibility: avoid libICE version 1.0.5, and instead test in libSM (via configure) if _IceP[ao]MagicCookie1Proc are declared in X11/ICE/ICEmsg.h and otherwise repeat their declarations. The disadvantage is that this temporary workaround will probably stay there forever. === IMHO possibility (A), and to some extent (C), is against the spirit of [1], but has the advantage to avoid creating a new library version. I would prefer possibility (B), but certainly like to have your opinion on this issue. Solution (B) would also require to move the declaration of SnfSetFormat into a header exported by libXfont (any good idea which one?). X11/fonts/fontmisc.h appears to be most appropriate place, with fontutil.h second, but xfs/os/config.c already include X11/fonts/fontutil.h (but maybe it is also including fontmisc.h indirectly). Once all that has been done, one can attack the real problem with libICE and libSM. They both contain code paths where a macro or function sets a buffer pointer to NULL (e.g., when malloc fails or for an extremely long previous client ID passed to libSM) but this buffer pointer is used subsequently without any test for this condition. with best regards, Peter Breitenlohner [EMAIL PROTECTED] Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (xserver)
http://tinderbox.x.org/builds/2008-12-05-0010/ http://tinderbox.x.org/builds/2008-12-05-0010/logs/xserver/#build loader.c:77:17: error: sym.h: No such file or directory loader.c: In function 'LoaderInit': loader.c:110: error: 'dixLookupTab' undeclared (first use in this function) loader.c:110: error: 'extLookupTab' undeclared (first use in this function) loader.c:111: error: 'miLookupTab' undeclared (first use in this function) loader.c:111: error: 'xfree86LookupTab' undeclared (first use in this function) Thanks for the report. It was my fault of not making a clean build last night. This was not the only problem tough. Due to removing the static symbol tables, X Server and modules built in the X Server tree had all linkage problems, as symbols were not added to the linkage of the X Server, or it failed to resolved dependencies, so order of libraries should be modified when linking. I readded a simplified version of the previous *sym.c files. I will try to have it generated automatically from the sdk headers, to avoid a difficult maintenance process, with the requirement of updating things in two places (header files and file with vector of symbols addresses). http://cgit.freedesktop.org/xorg/xserver/commit/?id=44c8c3cf7de589fb8e987f4ab931294eaf0b405f -- Chris Ball [EMAIL PROTECTED] Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (xserver)
http://tinderbox.x.org/builds/2008-12-03-0012/ http://tinderbox.x.org/builds/2008-12-03-0012/logs/xserver/#build In file included from Pci.c:130: ../../../../hw/xfree86/common/compiler.h:1041: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'volatile' ../../../../hw/xfree86/common/compiler.h: In function 'outb': ../../../../hw/xfree86/common/compiler.h:1212: error: 'ioBase' undeclared (first use in this function) Oddly, this is only happening on the bombadil machine so far, with gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) on ppc64-redhat-linux. Thanks for the report. I added a check for _X_EXPORT to compiler.h, and if it is not defined, it will include X11/Xfuncproto.h -- Chris Ball [EMAIL PROTECTED] Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xserver: Branch 'master' - 3 commits
Hi, You appear to have taken my patch and s/fprintf(stderr, /perror(/. Generally in a situation like this one would leave original authorship intact (even my comments were preserved!). Don't know why I changed that :-) It opens space for bikeshedding on something that should never happen (cvt failing to allocate memory). Anyway, I did not want to mean disrespectful or plagiarize your work. The patch is trivial, would not apply cleanly due to other changes, and you forgot to update configure.ac. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Symbol Visibility [was: Proposed changes to the current sdk]
Replying myself... I changed it to export all sdk symbols to not give people a reason to compile the X Server with --disable-visibility :-) But there are plenty of symbols that shouldn't really be made available to modules. While there are others that are so widely used that now they must be made available. There are also other symbols that were already exported, but not used by any module. Since several of them are in the sdk by accident, I am considering to create some private files, that aren't installed in the sdk. Sample pseudo actions for os.h: o copy os.h to osP.h o change all files that include os.h to include osP.h o change osP.h to include os.h o edit os.h to only export what really should be available to modules (i.e. external shared objects) The only special case should be symbols that would still be made visible because they are required by modules built in the X Server tree, but would not be made available publicly to external modules, and there would not exist the requirement of having them always available. I don't want to break things, neither make it too difficult to merge branches, etc, so, 'after some meditation', I come with what I believe is the better approach to have it easily manageable, and with the smallest chances of having it rotting in a short time frame. What I plan to do is: o Only use _X_EXPORT in header files, for the symbols that must be made available. o C files should use only _X_INTERNAL for the cases where a symbol must really be made private, and the X Server may not be compiled with hidden symbols. This means a big s/_X_EXPORT // `find . -name \*.c` in the X Server tree (but of course checking one by one). o Remove hw/xfree86/loader/*sym.c, as it is not mean't for use with the dlloader, and currently it was pretty much only useful to force the compiler to not inline functions (as it just created a vector with symbol addresses). The only requirement to have a symbol exported would be to add the _X_EXPORT in the header file, and have the C source with the definition include that header. This should have the least impact for developers, and be easy to maintain and keep up to date. I plan to do it tonight, so, if you have something agains't, say it before I push the changes, or ... Thanks, Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: macros: Changes to 'master'
Paulo Cesar Pereira de Andrade wrote: Makefile.am | 12 +--- configure.ac | 23 --- xorg-macros.m4.in | 27 +++ xorgversion.m4| 14 ++ 4 files changed, 58 insertions(+), 18 deletions(-) New commits: commit dcbbcb582cf712e59c1474632380943bea8f1a5e Author: Peter Breitenlohner [EMAIL PROTECTED] Date: Fri Nov 14 23:06:48 2008 +0100 bump to 1.2.0 Hi, Hi, it seems you forgot to push the corresponding tag (git push --tags) back to the fd.o repositories. I made the commits to address http://bugs.freedesktop.org/show_bug.cgi?id=18566 But to avoid confusion, due to a version bump not followed by a new release, I will make a real 1.2.0. -- Matthieu Herrb Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
[ANNOUNCE] util-macros 1.2.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Breitenlohner (5): reorganize autoconf macro files define and use XORG_CHANGELOG macro define XORG_CWARNFLAGS macro fix XORG_PROG_RAWCPP for cygwin bump to 1.2.0 git tag: util-macros-1.2.0 http://xorg.freedesktop.org/archive/individual/util/util-macros-1.2.0.tar.bz2 MD5: f64bf1356ffaccfb5fd4f3d74905eeb0 util-macros-1.2.0.tar.bz2 SHA1: 19ffcf706a5eef700766b7d62f693ffa0b06bb2a util-macros-1.2.0.tar.bz2 http://xorg.freedesktop.org/archive/individual/util/util-macros-1.2.0.tar.gz MD5: 7501edd1bdd7ef97afbd43a30f07abee util-macros-1.2.0.tar.gz SHA1: 6172aee7704b3549cff613b990f283fae4ddae5c util-macros-1.2.0.tar.gz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkxf2YACgkQPdKBRUa20MC3kgCgligNMLsh6UZ4tstog83X1u0D PRUAnR0EiqeAB28Cz29rYMzsKjWTv/bo =kygW -END PGP SIGNATURE- ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Ansification of X.Org code other cleanup work
On Mon, 20 Oct 2008, Alan Coopersmith wrote: Hi Alan, in your mail starting this thread If someone wanted to organize a janitorial squad to tackle these and help new people work through them to get to the point where they were ready for commit access, we'd love you forever (or at least until you turn us down when we then volunteer you to be the next release manager). [3] 122 open bugs, though many patches aren't keyworded: http://bugs.freedesktop.org/buglist.cgi?keywords=patchproduct=Xorgbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENED you suggested to have a look at these bugs and patches. In the meantime I have done just that. There are quite a few easy ones (apply cleanly to current git and are obvious changes such as strict ANSI C function definitions, fixing some small bugs, and similar). Here my recommendations: app/viewres bugid=18479 patchid=20208 apply app/xf86dga bugid=15084 patchid=15215 apply app/xfd bugid=18479 patchid=20209 apply app/xfontsel bugid=15083 patchid=15214 apply app/xgc bugid=18479 patchid=20210 apply app/xkbprint bugid=12790 patchid=12008 apply, maybe without commented old code bugid=15078 patchid=15207 apply with --whitespace=fix app/xkbutils bugid=15077 patchid=15206 apply app/xload bugid=15075 patchid=15205 apply app/xlsfonts bugid=15073 patchid=15203 apply app/xmessage bugid=15072 patchid=15202 apply app/xmh bugid=15071 patchid=15201 apply bugid=18479 patchid=20211 apply app/xprop bugid=16154 patchid=16813 apply app/xsm bugid=15066 patchid=15196 apply bugid=18479 patchid=20212 apply where bugid= refers to http://bugs.freedesktop.org/show_bug.cgi?id=n and patchid=n to http://bugs.freedesktop.org/attachment.cgi?id=n Note: patches 20208-20212 have been submitted by me. They correct an obvious build failure along the lines already applied to app/xedit, but nevertheless they need independent review and approval. Regards Peter Breitenlohner [EMAIL PROTECTED] Hi, I just applied all the patches. Thanks, and sorry for the delay. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Current tinderbox regression (xf86-input-aiptek)
http://tinderbox.x.org/builds/2008-11-28-0005/ http://tinderbox.x.org/builds/2008-11-28-0005/logs/xf86-input-acecad/#build acecad.c:76:28: error: sysfs/libsysfs.h: No such file or directory acecad.c: In function 'AceCadAutoDevProbe': acecad.c:250: warning: assignment makes pointer from integer without a cast acecad.c:253: warning: assignment makes pointer from integer without a cast acecad.c:256: warning: assignment makes pointer from integer without a cast acecad.c:259: error: expected expression before 'struct' acecad.c:259: error: expected ';' before '{' token Thanks, and sorry for causing the build failure. I originally made the patch I just committed to correct the problem, but then, I tried to look cool and make a one line patch, and messed it by not properly regenerating config.h, and adding a shell test where it was not applicable :-) -- Chris Ball [EMAIL PROTECTED] Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Broken X11 After Mandriva Upgrade
Hi, I recently upgraded to Mandriva to 2007 Free. In the process, something happened that broke X11. I have tried everything I can thing of but no joy. It has been very difficult to get any diagnostics because when I try to startx, the console goes black and neither keyboard nor mouse can do anything. I finally did a startx via ssh and got these errors: I suggest you try a newer Free release, otherwise, you will need to remove some packages, as it is, for some reason running X -configure. X Window System Version 7.1.1 [...] sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx Remove the x11-driver-video-sun... packages listed above. They were being build and installed by default, but they won't work on a normal ix86 computer. [...] Xorg: symbol lookup error: /usr/lib/xorg/modules/drivers/sunbw2_drv.so: undefined symbol: xf86MatchSbusInstances Do these message suggest a course of action to anyone as to how I can fix this? TIA. You can also run xorgcfg -textmode as root, in a shell to create an initial xorg.conf. -- View this message in context: http://www.nabble.com/Broken-X11-After-Mandriva-Upgrade-tp20627062p20627062.html Sent from the Free Desktop - xorg mailing list archive at Nabble.com. Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Possible patch to enable hidden symbols by default
Hi, Attached is a possible patch to enable compiling the XServer and modules with hidden symbols by default. Please comment :-) The patch allows using the --disable-visibility option, and variants to disable compilation with hidden symbols (or one could go wild and change the xorg-server.pc :-) This patch probably is better then the one I had posted in the bugzilla some time ago, as this one doesn't require changes to modules, neither editing Makefile.am by Makefile.am to choose if want hidden or public symbols; if the X Server works with hidden symbols, so should the modules. I am also attaching a slightly modified version of the original script I used to search for undefined symbols. To test it, run % xorg-symbols.pl | less to use the default prefix of /usr and module path of /usr/lib/xorg/modules, or run it with the arguments -? or -h for the available options. Right now, I am running today's git master, compiling the XServer with the attached patch, and the recent patches I added. I am also using the vesa driver now; other modules requires more patches, not yet added to avoid too much changes at a time... Thanks, Paulo diff --git a/configure.ac b/configure.ac index ea3d0fa..9beeca1 100644 --- a/configure.ac +++ b/configure.ac @@ -504,6 +504,9 @@ AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) +AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), +[SYMBOL_VISIBILITY=$enableval], +[SYMBOL_VISIBILITY=auto]) dnl GLX build options AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]), @@ -1229,6 +1232,46 @@ if test x$XORG = xyes; then XORG_CFLAGS=$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H XORG_LIBS=$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $SELINUX_LIB + dnl == + dnl symbol visibility + symbol_visibility= + have_visibility=disabled + if test x$SYMBOL_VISIBILITY != xno; then + AC_MSG_CHECKING(for symbol visibility support) + if test x$GCC = xyes; then + VISIBILITY_CFLAGS=-fvisibility=hidden + else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC=yes], [SUNCC=no]) + if test x$SUNCC = xyes; then + VISIBILITY_CFLAGS=-xldscope=hidden + else + have_visibility=no + fi + fi + if test x$have_visibility != xno; then + save_CFLAGS=$CFLAGS + CFLAGS=$CFLAGS $VISIBILITY_CFLAGS + AC_TRY_COMPILE( + [#include X11/Xfuncproto.h + extern _X_HIDDEN int hidden_int; + extern _X_EXPORT int public_int; + extern _X_HIDDEN int hidden_int_func(void); + extern _X_EXPORT int public_int_func(void);], + [], + have_visibility=yes, + have_visibility=no) + CFLAGS=$save_CFLAGS + fi + AC_MSG_RESULT([$have_visibility]) + if test x$have_visibility != xno; then + symbol_visibility=$VISIBILITY_CFLAGS + XORG_CFLAGS=$XORG_CFLAGS $VISIBILITY_CFLAGS + fi + fi + dnl added to xorg-server.pc + AC_SUBST([symbol_visibility]) + dnl === + PKG_CHECK_MODULES([PCIACCESS], [pciaccess = 0.8.0]) SAVE_LIBS=$LIBS SAVE_CFLAGS=$CFLAGS diff --git a/xorg-server.pc.in b/xorg-server.pc.in index 139adf4..7547aa3 100644 --- a/xorg-server.pc.in +++ b/xorg-server.pc.in @@ -15,5 +15,5 @@ Name: xorg-server Description: Modular X.Org X Server Version: @PACKAGE_VERSION@ Requires: pixman-1 pciaccess -Cflags: -I${sdkdir} +Cflags: -I${sdkdir} @symbol_visibility@ Libs: -L${libdir} xorg-symbols.pl Description: Perl program ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Is it possible to use i810 driver in Xorg7.3 without agpgart kernel module
Hi All, Hi, Is it possible to use i810 driver in Xorg7.3 without agpgart kernel module ? I use kernel 2.4.31. And It's OK for XFree86 4.6. I think it should work with older versions of the i810 driver, as long the driver recognizes your hardware. Some months ago I worked on something that should be similar to what you are doing, we needed to backport the agpgart kernel module, and i810 XFree86 driver to certified linux distros (redhat and conectiva), so that they would work with today's hardware. -- Regards, Paul Lin Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xset dpms force off
I am running a multi-head setup. I'd like to be able to turn off each head individually. I'm using the evil binary nvidia drivers to set up 4 screens as DISPLAY 0.0, 0.1, 0.2, and 0.3 I'm not using Xinerama or Twinview. xset -display :0.0 dpms force off turns off all 4 displays, as does xset -display :0.1 dpms force off and so on. Any way to reach in and turn off a particular display? Anyone know if this is possible with nouveau? Without seeing the actual setup it is a bit hard to say, but it should work with xrandr --off option (and usually --auto to restore). Thanks, --Yan Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6 release schedule
On Sat, 2008-11-15 at 15:57 -0200, Paulo César Pereira de Andrade wrote: I volunteered to manage an X server 1.6 release, tentatively scheduled for the end of the year (yes, this year, 2008). This release will include DRI2 and RandR 1.3 support. I'd like to know how much of the new Xinput stuff will be ready in time. I guess it will be required to skip https://bugs.freedesktop.org/show_bug.cgi?id=14730 again. I had that patch working for X Server 1.4 one year ago, and for git master before 1.5 was branched. But did not test it much recently. Anyway, it probably should stay this way, as the patch would be more useful when/if Xorg started using a sdk, with a compromise on backwards compatibility. But at the rate new features are being added, this is unlikely soon :-) Also by only exporting symbols that really should be visible, you get a compromise. Actually, I've been meaning to get this merged for a while now. I'll be happy to take a look at it again. I think the patches should still apply (besides some patches for mfb and glx/*.c). But I can review it again. Actually, I built a framework to work on this. I added the xedit ctags interface just for this :-), and wrote a perl script that will use objdump to list all external symbols provided/required by modules and X Server, and print where the symbols are found. The logic for finding where a symbol is defined is very simple: o Check X Server and libraries linked to it. o Check all other modules in the module path, the script can handle multiple module path, but it cannot ensure the driver is actually loading a module. It will also print a warning about multiple definitions. I think I got all patches required for modules already commited, but not for libraries (to define as weak some symbols also defined in the X Server). Points where special attention is required: o Usage of LoaderSymbol() or dlsym. For this I just grep'ed everything, and resolved by hand the missing symbols. Check hw/xfree86/i2c/*.h for awesome samples, where it will cast to a function and call the value returned by LoaderSymbol(). The ati multimedia drivers had some very similar usage, but that should have been fixed now, only missing feature there would be to be able to load the different multimedia drivers, as they all provide symbols with the same name, instead, it should provide a vector of driver callbacks. But see xorg/driver/xf86-video-ati/src/theatre.h for a sample of how to correct that usage of LoaderSymbol without breaking abi. o Symbols also defined in libraries. Best example is libXfont. if the X Server is plainly compiled with -fvisibility=hidden, it will not say there are missing symbols and use the stubs in libXfont, and the script will not even show the duplicated symbols (gcc can make some very aggressive optimizations when a symbol is not accessible from other shared objects, and just inline the hidden function). o Some symbols are a pain to find. My idea is to make some extra patches just to make finding symbols (with your preferred text editor :-) easier. The most important one is change things like: -%- #define NAME(function)prefix ## name type NAME(foo) { bar } -%- to: -%- #define BODY bar; type prefix_foo { BODY } -%- This also to handle the other common case of symbols hard to find: -%- type #ifdef FOO foo_name #else bar_name #endif (arguments) { baz } I don't remember if there are any files generated on the fly now, after the removal of mfb and xfxbpp -%- o There are drivers that access private symbols, that is, symbols not in /usr/include/xorg/*.h. I don't have a tool to generate information about these, but once I posted a list of symbols used by modules that are not in the sdk, and symbols in the sdk that are not used by any module (the script tells about symbols exported but not used by any module). But when/if making symbols easier to find, generating such list even by hand would not take much time. In the worst case, the framework is still good to find things like macros being compiled as a call to a function (due to not including the header with macro definition), or just plain code that calls functions no longer available. Also, besides the temptation, I did not ansify the X Server code to attempt to reduce patches size (it is still huge, besides having one patch addressing a different problem). Another detail is that it really needs some major review to decide what really needs to be in the sdk, because to have it properly implemented, everything in /usr/include/xorg/*.h should be made available, and I think like only half of those symbols are tagged _X_EXPORT. Yet another detail, it may be a good idea to also use gcc's visibility pragmas before inclusion of headers of external libraries. My original patches to util/macros was to have a @@HIDDEN_SYMBOLS@@ and @@PUBLIC_SYMBOLS@@, but probably it is
Re: Moving xkbcomp into the server
On Mon, Nov 17, 2008 at 11:25:25AM -0800, Dan Nicholson wrote: I decided to take a crack at moving xkbcomp into the server so it's not popen'd whenever a keymap is loaded. For the first crack, I'm trying to just leave xkbcomp pretty much unchanged except for the interface. What's causing me the most difficulty is converting to server API. One snag I've hit is XStringToKeysym. Here's an example usage in the xkbcomp parser: As much as I'd like to see it in the server - is the popen the painful bit? We are currently using the patch I posted sometime ago, to cache xkbcomp output on some oems. It should make significant difference on low profile computers. But I did not extend it to not not do things like parse the geometry, to avoid breaking the specs. But I think it is not quite reliably anymore... At least libxkbui was not working with xorgcfg for some time, and xorgcfg was probably the only client using it. But really, some major cleanup should be done. The geometry code I believe is more then half of the computing time, and not used. Also, the caching should be done on a more higher layer, instead of sha1'ing all the xkbmap, it should sha1 just the main descriptions, like the setxkbmap -print output. AFAIU, the current approach goes from RMLVO to Kkcstg to xkb to xkm, every time we call InitKeyboardDeviceStruct. Ideally, we'd like to cache and re-use as much as possible. Usually, all keyboards come up with the same map anyway and compiling it again is redundant. Just doing that might already save a significant chunk of time. This should also be much easier to achieve, and if it provides a relevant speedup it would be great as interim solution. So the path is XkbInitKeyboardDeviceStruct:xkb/xkbInit.c - XkbDDXNamesFromRules:xkb/ddxLoad.c this is where all the rules parsing happens, skipping that may save time. - XkbDDXLoadKeymapByNames:xkb/ddxLoad.c this is where xkbcomp is called with the Kcstg format. xkbcomp now parses that into an xkm format - XkmReadFile:xkb/xkmread.c here we read in the compiled keymap and basically copy it into the internal structs. Cheers, Peter Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6 release schedule
I volunteered to manage an X server 1.6 release, tentatively scheduled for the end of the year (yes, this year, 2008). This release will include DRI2 and RandR 1.3 support. I'd like to know how much of the new Xinput stuff will be ready in time. Hi Keith, First, thanks for doing it. I understand that people should rely on tarballs available at http://xorg.freedesktop.org/releases/individual, but given that packages like X Server, libdrm and mesa have stable branches, I would like to see those more used, and people being able to clone those repositories and building from source, from the stable branches. Several distros (Mandriva is one) did not yet update from 1.4 to 1.5. Since I want to believe that 1.5 to 1.6 will not have major abi changes, this could be a good oportunity for distros to get back in sync with Xorg. I guess it will be required to skip https://bugs.freedesktop.org/show_bug.cgi?id=14730 again. I had that patch working for X Server 1.4 one year ago, and for git master before 1.5 was branched. But did not test it much recently. Anyway, it probably should stay this way, as the patch would be more useful when/if Xorg started using a sdk, with a compromise on backwards compatibility. But at the rate new features are being added, this is unlikely soon :-) Also by only exporting symbols that really should be visible, you get a compromise. Due to the large amount of changes, this is also something that will cause potential personal conflicts, if you add patches to someone else's package. So, instead of changing configure.ac's and Makefile.am's, maybe make it modify XORG_CFLAGS; if the X Server can compile and become functional with -fvisibility, there is no reason drivers won't; only libraries of course needs special handling, and in most cases, just mark as weak duplicated symbols, and make sure the X Server is exporting it's version of the symbol. Here's a proposed schedule of events: Cut a release branch, do a -RC1 release: 11/24 Track remaining work on scheduled features, cherry-picking commits from master. Cut -RC2 12/8 Stop accepting new code, focus on bug fixing. Cut -RC3 12/22 Update documentation, mark known bugs, build packages and ship final bits. 1/5 After -RC1, all commits to the branch must go through the 1.6 proposed commits page: http://wiki.x.org/wiki/Server16Branch If you've got merges you'd like to have included, instead of just a patch or two, please post the repository and branch name. I'll pull stuff across and push to the branch. -- [EMAIL PROTECTED] ___ Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: building modular xorg
Manoa Nosea [EMAIL PROTECTED] writes: according to: http://dri.freedesktop.org/wiki/Building http://wiki.x.org/wiki/ModularDevelopersGuide http://xorg.freedesktop.org/wiki/Development/git I more or less managed to built it, however if there is an updated location for any of these manuals I would like to know if there are any others. the real problem however, is that none of them specify how to prevent each package from accessing the system's libraries, so that the newly built xorg only sees the dependencies that I build, not the ones that are present in the system. I manage that just fine by using configure's prefix option and PKG_CONFIG_PATH to the correct directory for the pkg-config of the installed library. If you build everything so that the dependencies are built first, it should work, but one pkg-config loaded incorrectly, and it will be a snow ball. Probably the best bet is to build on a computer without devel packages installed, or build in a chroot. There are also compiz and grandr, that will link with external libraries, that will push as dependencies the system installed libraries. Assuming you built everything correct, you still needs to fight to get the programs to use the proper libraries, for simple cases, setting LD_LIBRARY_PATH should be enough, but not always, as some intermediate script elsewhere (when loading a desktop environment) may reset it. For basic/simple programs it should work, but more complex things, will fail badly, due to things like some module loading dynamically a library like libX11.so. But to tell you the truth, I don't know all things that can go wrong, but I noticed things like event bases, at least for damage and shape can get messed. So, again, the best bet to properly test it is probably either not having the system X related libraries, or running tests from a chroot. If you have a more specific problem please say it. I'm no expert but I could help. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [PATCH] Removal of a needless null statement
Fernando == Fernando Carrijo [EMAIL PROTECTED] writes: Fernando ... and there are still others. XCB and libX11, to list a few! Yes, we have to look in the other repos as well. Git grep makes is relatively easy, but only works one repo at a time. I'll get the ones in app and lib, but I lack commit privs on XCB and don't want to step on any toes for the drivers. The affected drivers are: xf86-input-digitaledge xf86-input-hyperpen xf86-input-summa xf86-video-ast xf86-video-cyrix xf86-video-i128 xf86-video-i740 xf86-video-intel xf86-video-nsc xf86-video-savage xf86-video-sis xf86-video-sisusb xf86-video-ati I remember there were also a few cases of code like: #define macro(object) (object)-field; that would generate warnings of mixed code and declarations, as these macros were used in code like: type function(arguments) { type variable = macro(object); type other_variable; ... } -JimC Paulo ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg