Re: Current tinderbox regression (libtrans)

2009-02-09 Thread Paulo César Pereira de Andrade
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,
but they are "least" interesting packages, like
xf86-input-keyboard.

>   -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""

2009-02-08 Thread Paulo César Pereira de Andrade
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 
> ---
>  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

Janitor/RFC: Xorg packages

2009-02-06 Thread Paulo César Pereira de Andrade
  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"])
   
   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 cut&paste,
   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


Re: xorg/driver/xf86-video-ast: [PATCH 1/2] Janitor: make distcheck, .gitignore.

2009-02-06 Thread Paulo César Pereira de Andrade
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 cut&paste
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


Re: xorg/driver/xf86-input-synaptics: [PATCH 2/2] Janitor: compile warnings and "missing" symbols.

2009-02-06 Thread Paulo César Pereira de Andrade
Daniel Stone wrote:
> On Fri, Feb 06, 2009 at 05:50:58AM -0800, Dan Nicholson wrote:
>> This is probably fine, but it's a little safer to use the
>> AC_CHECK_LIBM macro from libtool.
>>
>> configure.ac:
>> AC_CHECK_LIBM
>>
>> src/Makefile.am:
>> @driver_n...@_drv_la_libadd = $(LIBM)
>
> Oooh, cool.  We've got a few hardcoded -lm's around.

  In this specific case, it should not really matter much
as the X Server must be linked with libm.
  But for example, I believe xf86-input-acecad is better
with:

if HAVE_LIBSYSFS
@driver_n...@_drv_la_libadd = -lsysfs
endif

then the hack it had previously to dlopen libsysfs.

  The @DRIVER_NAME@ patterns probably would be better
also not used. As it is very unlikely a single Makefile.am
could be used for all drivers, and I don't see it much
useful, other then if someone wants to give a different
name to a driver every week. But then some work must be
done to expand @DRIVER_NAME@ in the C file also...

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

2009-02-05 Thread Paulo César Pereira de Andrade
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


Re: xorg/driver/xf86-input-jamstudio: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
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


xf86-video-ati: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
  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 
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 
---
 .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: extension init cleanup

2009-02-05 Thread Paulo César Pereira de Andrade
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


Re: extension init cleanup

2009-02-05 Thread Paulo César Pereira de Andrade
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


xorg/driver/xf86-video-ast: [PATCH 2/2] Janitor: Correct compiler warnings.

2009-02-05 Thread Paulo César Pereira de Andrade
  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 
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 
---
 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 | Charx8Do

xorg/driver/xf86-video-ast: [PATCH 1/2] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From b91bad5c82321cfd43872befd75041718d5c9a40 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 18:43:55 -0200
Subject: [PATCH 1/2] 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 to help find driver problems.
  Add back the executable bit to autogen.sh.
  Use a single .gitignore file.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore  |5 ++
 ChangeLog   |  170 ---
 Makefile.am |   11 +++-
 configure.ac|   14 ++--
 src/.gitignore  |6 --
 src/Makefile.am |2 +-
 6 files changed, 23 insertions(+), 185 deletions(-)
 delete mode 100644 ChangeLog
 mode change 100644 => 100755 autogen.sh
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..2bb4cad 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-ast-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 5ea7df7..000
--- a/ChangeLog
+++ /dev/null
@@ -1,170 +0,0 @@
-2009-01-16  Y.C. Chen  
-* src/ast_driver.c
-- Fixed Support Modes Incorrect Issues on Solaris 10 x86
-
-2009-01-08  Y.C. Chen  >yc_c...@aspedtech.com>
-* src/ast.h
-* src/ast_driver.c
-* src/ast_2dtool.c, ast_2dtool.h
-* src/ast_accel.c
-* src/ast_cursor.c
-* src/ast_mode.c
-* src/ast_vgatool.c
-- Support AST2200/2150
-- Support ASPEED Graphics as Secondary
-- Fixed AST1100 1280x1024x32bpp thershold issue
-- Fixed Screen saver - celtic, DecayScreen abnormal issues
-- Fixed Game - Potato Guys abnormal issue
-
-2008-08-22  Y.C. Chen  
-* src/ast.h
-* src/ast_driver.c
-* src/ast_vgatool.c, ast_vgatool.h
-Support AST1100/2050/2100
-
-* src/ast_mode.c ast_mode.h
-Modify the display timing of 1920x1200 to reduce blanking timing
-
-* src/ast_driver.c
-* src/ast_vgatool.c
-Support Clone Display for Two VGA
-
-2008-07-21  Y.C. Chen  
-* src/ast_mode.c
-Fixed Incorrect Settings for Graphices Registers 
-
-2008-03-18  Y.C. Chen  
-* src/ast_2dtool.c
-* src/ast_tool.c
-Compiler Warning Fixed
-
-2008-03-01  Y.C. Chen  
-* src/ast_driver.c:
-Add _X_EXPORT for symbols public visibility
-
-2007-08-24  Y.C. Chen  
- 
-	* configure.ac:
-	* src/ast.h:
-	* src/ast_2dtool.c:
-	* src/ast_accel.c:
-	* src/ast_cursor.c:
-	* src/ast_driver.c:
-	* src/ast_mode.c:
-	* src/ast_tool.c:
-	* src/ast_vgatool.c:
-* src/ast_2dtool.h
-* src/ast_mode.h:
-Support AST2100
-
-2006-04-17  Y.C. Chen  
-
-	* src/ast_vgatool.c: (GetMaxDCLK):
-Fixed can't get correct MCLK in some platforms 
-
-2006-04-07  Adam Jackson  
-
-	* configure.ac:
-	* src/ast.h:
-	* src/ast_2dtool.c:
-	* src/ast_accel.c:
-	* src/ast_cursor.c:
-	* src/ast_driver.c:
-	* src/ast_mode.c:
-	* src/ast_tool.c:
-	* src/ast_vgatool.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 0.81.0.
-
-2006-03-15  Alan Coopersmith  
-
-	* src/ast.h: 
-	* src/ast_2dtool.c:
-	* src/ast_accel.c:
-	Update from ASPEED Technology Inc. to fix incorrect line drawing issue
-	and change driver name from "AST1000/2000" to "AST" to fix Xorg log
-	formatting issues with long driver names.
-	Bugzilla #4937 
-	Attachment #4948 
-
-2006-03-14  Alan Coopersmith  
-
-	* COPYING:
-	* autogen.sh:
-	* configure.ac:
-	* Makefile.am:
-	* src/Makefile.am:
-	* .cvsignore:
-	* src/.cvsignore:
-	Add the normal trappings of the Xorg modular build system.
-
-	* src/ast_2dtool.c:
-	* src/ast_accel.c:
-	* src/ast_cursor.c:
-	* src/ast_driver.c:
-	* src/ast_mode.c:
-	* src/ast_tool.c:
-	* src/ast_vgatool.c:
-	Replace "Xv.h" with  and add 
-	#include "config.h" for modular build
-	Strip ^M out of ast_accel.c
-	
-2006-03-14  Alan Coopersmith  
-	
-	* src/ast.h:
-	* src/ast_2dtool.c:
-	* src/ast_2dtool.h:
-	* src/ast_accel.c:
-	* src/ast_driver.c:
-	* src/ast_vgatool.c:
-	Version 0.80 from ASPEED Technology Inc.
-	(Fixed abnormal display if set 2D Acceleration Option as MMIO mode)
-	Bugzilla #4937 
-	Attachment #4932 
-
-2006-03-14  Alan Coopersmith  
-
-	* src/ast.h:
-	* src/ast_driver.c:
-	* src/ast_vgatool.c:
-	Version 0.62 from ASPEED Technology Inc.
-	(Fixed get video buffer size incorrect issue)
-	Bugzilla #4937 
-	Attachment #4563 

xorg/driver/xf86-video-ark: [PATCH] Janitor: make distcheck, compile warnings, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 2d63aa335cf3cba4ea462d824019990590e8f17e Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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  
-
-	* 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  
-
-	* src/ark_driver.c: (ARKPreInit):
-	
-	Remove wrong usage of pScrn->clock.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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_CFLAGS)
+
 ark_drv_la_LTLIBRARIES = ark_drv.la
 ark_drv_la_LDFLAGS = -module -avoid-version
 ark_drv_ladir = @moduledir@/drivers
diff --git a/src/ark_driver.c b/src/ark_driver.c
index 67eb076..6e396da 100644
--- a/src/ark_driver.c
+

xorg/driver/xf86-video-apm: [PATCH 2/2] Janitor: compile warning fixes.

2009-02-05 Thread Paulo César Pereira de Andrade
>From fb59b563f6a586ee491f437281c7251f8a83d8f5 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 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-apm: [PATCH 1/2] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 545a71d5ad1eecac2285b4d76f4bafb7a33397f1 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 17:51:47 -0200
Subject: [PATCH 1/2] 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.
  Minor cleanup to prefer using $(VAR) instead of @VAR@, also
simplifying configure.ac by removing the AC_SUBST(VAR).

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore  |6 +
 ChangeLog   |   67 ---
 Makefile.am |   10 +++-
 configure.ac|   14 +--
 src/Makefile.am |3 ++
 5 files changed, 24 insertions(+), 76 deletions(-)
 delete mode 100644 ChangeLog

diff --git a/.gitignore b/.gitignore
index 2df4a8d..0c05190 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-video-apm-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 482b388..000
--- a/ChangeLog
+++ /dev/null
@@ -1,67 +0,0 @@
-2006-04-07  Adam Jackson  
-
-	* configure.ac:
-	* src/apm_driver.c:
-	Bump to 1.1.1 for Xv changes.
-
-2006-04-07  Aaron Plattner  
-
-	* src/apm_video.c: (ReputImage), (PutImage):
-	Add a DrawablePtr argument to the XV functions to pave the way for
-	redirected video.
-
-2006-04-06  Adam Jackson  
-
-	* configure.ac:
-	* src/apm.h:
-	* src/apm_dga.c:
-	* src/apm_driver.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-	* src/apm_driver.c:
-	Fix a missed VERSION -> APM_VERSION.
-
-2005-12-26  Adam Jackson  
-
-	* src/apm_driver.c:
-	Bug #5356: Don't redefine VERSION.  (Tilman Sauerbeck)
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* configure.ac:
-	Update pkgcheck dependencies to work with separate build roots.
diff --git a/Makefile.am b/Makefile.am
index 98bb94a..f2c44ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,4 +27,12 @@ README: README.sgml
 	$(MAKE_TEXT) README.sgml && mv README.txt README
 endif
 
-EXTRA_DIST = README.sgml
+EXTRA_DIST = README.sgml ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index b15f61e..9ca8be0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_INIT([xf86-video-apm],
 xf86-video-apm)
 
 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"])
 
@@ -55,17 +59,10 @@ 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)
+sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
 
 PKG_CHECK_MODULES(XF86RUSH, xxf86rush, have_xf86rush=yes, have_xf86rush=no)
 AM_CONDITIONAL(XF86RUSH, test "x$have_xf86rush" = xyes)
-AC_SUBST([XF86RUSH_LIBS])
-AC_SUBST([XF86RUSH_CFLAGS])
-
-CFLAGS="$CFLAGS $XORG_CFLAGS $XF86RUSH_CFLAGS"' -I$(top_srcdir)/src'
-INCLUDES="$XORG_INCS -I${sdkdir} $XF86RUSH_INCS "'-I$(top_srcdir)/src -I$(prefix)/include'
-AC_SUBST([CFLAGS])
-AC_SUBST([INCLUDES])
 
 save_CFLAGS="$CFLAGS"
 CFLAGS="$XORG_CFLAGS"
@@ -98,6 +95,7 @@ AC_SUBST([DRIVER_NAME])
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 XORG_CHECK_LINUXDOC
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 8a6779e..6fe12a0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,8 +24,11 @@
 # -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) $(XF86RUSH_CFLAGS)
+
 apm_drv_la_LTLIBR

xorg/driver/xf86-input-void: Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 224fbae491033d673c71eccabe35480f3d7869d0 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 17:33:54 -0200
Subject: [PATCH 2/2] Janitor: make distcheck, .gitignore.

  Use `` instead of $().
  Use $PKG_CONFIG to honor user build setup.
  Use a single .gitignore file.
  Use the XORG_CWARFLAGS and XORG_CHANGELOG macros.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore  |6 ++
 Makefile.am |5 ++---
 configure.ac|   16 +---
 man/.gitignore  |2 --
 src/.gitignore  |6 --
 src/Makefile.am |2 ++
 6 files changed, 19 insertions(+), 18 deletions(-)
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..068c045 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-void-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 4f9559c..1817e61 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,13 +21,12 @@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
 
-EXTRA_DIST = autogen.sh 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 8b0119d..4a62d5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=void
-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=void
+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 2221bbc..3538c8f 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

xorg/driver/xf86-input-void: [PATCH 1/2] Janitor: update for ABI_XINPUT_VERSION >= 5

2009-02-05 Thread Paulo César Pereira de Andrade
>From fafd4f546bf75e71ce92feaa52d50699fae81a21 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 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-input-vmmouse: [PATCH] Janitor: make distcheck, compile warnings, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 1740ffb411f6512db3679f5a2280d850d8a212de Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 17:07:31 -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.
  Compile warning were generate by using XORG_CWARNFLAGS macro, and
generated by gcc and/or sparse.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore |6 ++
 ChangeLog  |   25 -
 Makefile.am|9 +
 configure.ac   |   16 +---
 shared/Makefile.am |1 +
 src/Makefile.am|1 +
 src/vmmouse.c  |6 +++---
 tools/Makefile.am  |1 +
 tools/vmmouse_detect.c |2 +-
 9 files changed, 31 insertions(+), 36 deletions(-)
 delete mode 100644 ChangeLog

diff --git a/.gitignore b/.gitignore
index 4f978e1..3cc0128 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,9 @@ ltmain.sh
 missing
 stamp-h1
 *~
+*.4
+hal-probe-vmmouse
+vmmouse_detect
+xf86-input-vmmouse-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 467041b..000
--- a/ChangeLog
+++ /dev/null
@@ -1,25 +0,0 @@
-2006-04-06  Adam Jackson  
-
-	* configure.ac:
-	* src/vmmouse.c:
-	* src/vmmouse_proto.h:
-	Unlibcwrap.  Bump server version requirement.  Bump to 12.4.0.
-
-2006-03-28  Philip Langdale  
-
-	* configure.ac:
-	* src/vmmouse.c: Bump PATCHLEVEL.
-	* src/vmmouse_proto.h: Use the right #define
-	when detecting a 64bit compilation. This fixes
-	the driver to actually work for 64bit builds.
-
-2006-01-16  Philip Langdale  
-
-	* configure.ac:
-	* src/vmmouse.c: Bump PATCHLEVEL.
-	* src/vmmouse_proto.c: push/pop ebx to keep
-	gcc4 happy when compiling with -fPIC.
-
-2006-01-06  Philip Langdale  
-
-	* Initial release.
diff --git a/Makefile.am b/Makefile.am
index 2e7b369..9eb5b50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,3 +20,12 @@
 
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = shared src tools fdi man
+EXTRA_DIST = ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 118ae84..eec8a62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=vmmouse
-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"])
 
@@ -102,7 +103,7 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.1] xproto $REQUIRED_MODULES)
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+sdkdir=`PKG_CONFIG --variable=sdkdir xorg-server`
 
 PKG_CHECK_EXISTS([xorg-server >= 1.1.0],
  [AC_DEFINE([HAVE_XORG_SERVER_1_1_0], 1,
@@ -116,15 +117,16 @@ PKG_CHECK_EXISTS([xorg-server > 1.4.0.90],
 		 [AC_DEFINE([ABS_VALUATOR_AXES], 1,
 			[Define absolute valuator axes])])
 
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-AC_SUBST([CFLAGS])
-
 # Checks for libraries.
 
 # Checks for header files.
 AC_HEADER_STDC
 
+DRIVER_NAME=vmmouse
+AC_SUBST([DRIVER_NAME])
+
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile shared/Makefile src/Makefile tools/Makefile fdi/Makefile man/Makefile])
diff --git a/shared/Makefile.am b/shared/Makefile.am
index feedffa..011b07b 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -17,6 +17,7 @@
 #  VMWARE, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS)
 
 INCLUDES = -I$(srcdir)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 6848537..b84330b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,6 +17,7 @@
 #  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS)
 
 @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la
 @driver_n...@_drv_la_ldflags = -module -avoid-version
diff --git a/src/vmmouse.c b/src/vmmouse.c
index a712bd5..9fd926a 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -108,7 +108,7 @@
  * extra zero for the fourth digit.
  */
 #ifdef __GNUC__
-const char vm_mouse_version[] __attribute__((section(

xorg/driver/xf86-input-ur98: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 994cf8e7ba3f730061ede948fcee001709c63a5b Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 16:58:30 -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.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore  |6 ++
 ChangeLog   |   50 --
 Makefile.am |9 +
 configure.ac|   16 +---
 man/.gitignore  |2 --
 src/.gitignore  |6 --
 src/Makefile.am |2 ++
 7 files changed, 26 insertions(+), 65 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..b62c854 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-ur98-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index a784451..000
--- a/ChangeLog
+++ /dev/null
@@ -1,50 +0,0 @@
-2006-04-06  Adam Jackson  
-
-	* configure.ac:
-	* src/xf86Ur-98.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-04  Kevin E. Martin  
-
-	* configure.ac:
-	Add check for .
-
-2005-11-01  Kevin E. Martin  
-
-	* 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 1927785..0200a1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=ur98
-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,13 +77,13 @@ 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.
 
+DRIVER_NAME=ur98
+AC_SUBST([DRIVER_NAME])
+
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADER([linux/joystick.h], [],
@@ -90,5 +91,6 @@ AC_CHECK_HEADER([linux/joystick.h], [],
 
 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 b410b30..a701139 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

xorg/driver/xf86-input-tek4957: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From dace9ea68b7747a4a7f614665500ea9bf3adff13 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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  
-
-	* configure.ac:
-	* src/xf86Tek4957.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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 mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: [PATCH] Fix cast int-to-pointer and pointer-to-int

2009-02-05 Thread Paulo César Pereira de Andrade
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-synaptics: [PATCH 2/2] Janitor: compile warnings and "missing" symbols.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 1684a85f624b38856f51608976e5711462370770 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 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, XIPropertyValuePtr prop,
-BOOL che

xorg/driver/xf86-input-synaptics: [PATCH 1/2] Janitor: make distcheck, pkg-config, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From ab4cce1b7672a67c922a4ac881fc3d60fb552345 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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 
-
-	* ChangeLog: testing the official hosting at freedesktop.org
-
-2008-06-06  Christoph Brill 
-
-	* 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 
-
-	* 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=],
+		[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
+++ b/tools/Makefile.am
@@ -17,6 +17,7 @@
 #  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 

Re: [PATCH] Fix cast int-to-pointer and pointer-to-int

2009-02-05 Thread Paulo César Pereira de Andrade
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.html&lang=en&content=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


driver/xf86-input-summa: [PATCH] Janitor: Use a single .gitignore, pkg-config, avoid $()

2009-02-05 Thread Paulo César Pereira de Andrade
>From 30063a62d2235abeaa8567f1c0fc4f1eb2c02e89 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 5 Feb 2009 15:25:05 -0200
Subject: [PATCH] Janitor: Use a single .gitignore, pkg-config, avoid $()

Use `` instead of $().
  Use $PKG_CONFIG to honor user build setup.
  Use a single .gitignore file.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore |5 +
 configure.ac   |2 +-
 man/.gitignore |2 --
 src/.gitignore |6 --
 4 files changed, 6 insertions(+), 9 deletions(-)
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..566b42a 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-input-summa-*.tar.*
+ChangeLog
+tags
diff --git a/configure.ac b/configure.ac
index f3a655d..4ba0053 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,7 +81,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.
 
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
-- 
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.

2009-02-05 Thread Paulo César Pereira de Andrade
>From 729b45b0a1ac4ef6a5f92549c8148b7ee7a6fa4a Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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

driver/xf86-input-penmount: [PATCH] Janitor: make distcheck, compile warnings, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From b4a05a860087f1aea5bc64390ea23e17654e48c3 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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-palmax: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
>From bd89831ba1f003c9f6bdaf3c2481e11885e7a646 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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  
-
-	* configure.ac:
-	* src/xf86Palmax.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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 = @inputdir@
-- 
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.

2009-02-05 Thread Paulo César Pereira de Andrade
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


driver/xf86-input-mutouch: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-05 Thread Paulo César Pereira de Andrade
  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 
Date: Thu, 5 Feb 2009 14:37:48 -0200
Subject: [PATCH] Janitor: make distcheck, .gitignore.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .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  
-
-	* configure.ac:
-	* src/xf86MuTouch.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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
 @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-mouse: [PATCH] Janitor: use $PKG_CONFIG and update .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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 
---
 .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: xorg/driver/xf86-input-magellan: Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
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


Re: xorg/xserver: [PATCH] Janitor: change include/xkbsrv.h include guard symbol.

2009-02-04 Thread Paulo César Pereira de Andrade
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 
>> Date: Wed, 4 Feb 2009 18:33:57 -0200
>> Subject: [PATCH] Janitor: change include/xkbsrv.h include guard symbol.
>>
>>   It conflicts with .
>>
>>   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 
>> ---
>>  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/app/xhost: [PATCH] Remove support for old kerberos5 api.

2009-02-04 Thread Paulo César Pereira de Andrade
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 '
> 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:
 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/driver/xf86-input-evdev: [PATCH] Correct make distchek using the same solution used in other packages.

2009-02-04 Thread Paulo César Pereira de Andrade
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/driver/xf86-input-evdev: [PATCH] Correct make distchek using the same solution used in other packages.

2009-02-04 Thread Paulo César Pereira de Andrade
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


xorg/driver/xf86-input-microtouch: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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 
---
 .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

xorg/driver/xf86-input-magellan: Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  Another trivial patch.

>From 9d37cb0dd0841f9135727c81c63fc4cc0b510396 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
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 
---
 .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

Re: [PATCH] Remove "-Wbad-function-cast"

2009-02-04 Thread Paulo César Pereira de Andrade
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 
> ---
>
> 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-keyboard: [PATCH 2/2] Janitor: compiler warnings, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  This is a "pure" janitor patch, and should be
trivial enough.

  But to not leave an empty email :-) I commented
about the warnings generated due to no previous
prototype for the symbols that dlloader uses when
loading a module. Maybe they should be declared
in a module/driver private header?


  Some time ago I posted a "rfb" (request for brainstorm :-)
about possibly using a concept like LinkKit for Xorg.
In that case, modules would be linked in a single binary,
and the current/ancient xorg.conf would actually be a
Makefile. In that case, a, probably generated C source
code would possibly need a declaration for the symbol.

>From 3d5c6b3e34ee4bf2f0be3bb189acdc66abf7f70c Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Wed, 4 Feb 2009 18:59:23 -0200
Subject: [PATCH 2/2] Janitor: compiler warnings, .gitignore.

  Correct common sparse warning about integer used where a pointer
is expected. Remaining warnings are about the symbols that the
X Server loader should "dlsym()" to load the module, and are
extern/exported, but have no declaration anywhere.

  Use only one .gitignore file in the toplevel directory.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 .gitignore |4 
 man/.gitignore |2 --
 src/.gitignore |6 --
 src/kbd.c  |2 +-
 4 files changed, 5 insertions(+), 9 deletions(-)
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 8cc2c1c..eb19a4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.deps
 Makefile
 Makefile.in
 *.la
@@ -19,3 +20,6 @@ missing
 stamp-h1
 *~
 kbd.4
+xf86-input-keyboard-*.tar.*
+ChangeLog
+tags
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/kbd.c b/src/kbd.c
index dd3e099..001cde9 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -280,7 +280,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 pInfo->fd = -1;
 pInfo->dev = NULL;
 pInfo->private_flags = 0;
-pInfo->always_core_feedback = 0;
+pInfo->always_core_feedback = NULL;
 pInfo->conf_idev = dev;
 
 if (!xf86IsPc98())
-- 
1.6.1
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

xorg/driver/xf86-input-keyboard: [PATCH 1/2] Correct compilation for ABI_XINPUT_VERSION >= 5

2009-02-04 Thread Paulo César Pereira de Andrade
  I built and posted this patch a few days ago, after some
of the complaints about xf86-input-keyboard not compilable
in git master.

  The only known missing feature is that auto repeat doesn't
work, as it is now "done by software" in xkb, but I did not
digg enough in xkb code to understand how it would be the
proper way to update the current code to use the proper ABI.

  At worst, this patch leaves a usable kbd driver, and
corrects git master compilation, but it surely is not the
proper solution for operating systems not using the evdev
driver.
>From 25ccd583d35e22e1123b1b42d2c22525566b1354 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Wed, 4 Feb 2009 18:52:20 -0200
Subject: [PATCH 1/2] Correct compilation for ABI_XINPUT_VERSION >= 5

  This patch corrects compilation and is tested and functional.
  It is a slightly modified to correct an inverted #if GET_ABI_MAJOR...
I posted at xorg@lists.freedesktop.org some time ago.
  The only noticed missing feature is that autorepeat doesn't work with
ABI_XINPUT_VERSION >= 5. It also doesn't protect a lot of os-specific
code that now is a noop.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 src/atKeynames.h |4 +-
 src/kbd.c|  109 -
 src/xf86OSKbd.h  |2 +
 3 files changed, 79 insertions(+), 36 deletions(-)

diff --git a/src/atKeynames.h b/src/atKeynames.h
index 85f13ac..7dc2c70 100644
--- a/src/atKeynames.h
+++ b/src/atKeynames.h
@@ -67,7 +67,9 @@
 #define ScrollLockMask	Mod5Mask
 
 #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
-#define ModifierDown(k) ((keyc->state & (k)) == (k))
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
+#  define ModifierDown(k) ((keyc->state & (k)) == (k))
+#endif
 
 /*
  * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
diff --git a/src/kbd.c b/src/kbd.c
index 38d6513..dd3e099 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -47,8 +47,10 @@
 #include 
 #endif
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
 extern int XkbDfltRepeatDelay;
 extern int XkbDfltRepeatInterval;
+#endif
 
 #define CAPSFLAG	1
 #define NUMFLAG		2
@@ -174,11 +176,13 @@ static const char *kbd98Defaults[] = {
 NULL
 };
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
 const char *xkbSymbols[] = {
 	"XkbDfltRepeatDelay",
 	"XkbDfltRepeatInterval",
 	NULL,
 };
+#endif
 
 #ifdef XKB
 static char *xkb_rules;
@@ -214,7 +218,8 @@ SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
 }
 
 
-#define ModifierIsSet(k) ((modifiers & (k)) == (k))
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
+#  define ModifierIsSet(k) ((modifiers & (k)) == (k))
 
 static Bool
 CommonSpecialKey(int key, Bool down, int modifiers)
@@ -244,7 +249,7 @@ CommonSpecialKey(int key, Bool down, int modifiers)
   }
   return FALSE;
 }
-
+#endif
 
 static InputInfoPtr
 KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
@@ -290,7 +295,9 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 pInfo->private = pKbd;
 pKbd->PostEvent = PostKbdEvent;
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
 xf86LoaderReqSymLists(xkbSymbols, NULL);
+#endif
 
 if (!xf86OSKbdPreInit(pInfo))
 return pInfo;
@@ -299,6 +306,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 return pInfo;
 }
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
 if ((s = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL))) {
 int delay, rate;
 if (sscanf(s, "%d %d", &delay, &rate) != 2) {
@@ -311,6 +319,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 }
 xfree(s);
 }
+#endif
 
 if ((s = xf86SetStrOption(pInfo->options, "XLeds", NULL))) {
 char *l, *end;
@@ -329,7 +338,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 }
 
 #ifdef XKB
-
+#  if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
 /* XkbDisable must be a server flag but for compatibility we check it here */
 
   if (xf86FindOption(pInfo->options, "XkbDisable"))
@@ -340,7 +349,9 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
   pKbd->noXkb = noXkbExtension;
   if (pKbd->noXkb) {
   xf86Msg(X_CONFIG, "XKB: disabled\n");
-  } else {
+  } else
+#  endif
+  {
   SetXkbOption(pInfo, "XkbKeymap", &xkbnames.keymap);
   if (xkbnames.keymap) {
   xf86Msg(X_CONFIG, "%s: XkbKeymap overrides all other XKB settings\n",
@@ -441,15 +452,18 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
pKbd->keyLeds &= ~COMPOSEFLAG;
}
leds = ctrl->leds & ~(XCAPS | XNUM | XSCR); /* ??? */
-#ifdef XKB
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
+#  ifdef XKB
if (pKbd->noXkb) {
-#endif
+#  endif
pKbd->leds = (leds & pKbd->xledsMask) | (pKbd->leds & ~pKbd->xledsMask);
+  } else
+#endif
+  {
 #ifdef XKB
-  } else {
pKbd->leds = leds;
-  }
 #endif
+  }
   pKbd->SetLeds(pInfo, pKbd->leds);
   pKbd->autoRepeat = ctrl->autoRepeat;
 
@@ -544,8 +558,12 @@ KbdProc(DeviceIntPtr device, int what)
 
   InputInfoPtr pInfo = device-

xorg/xserver: [PATCH] Janitor: change include/xkbsrv.h include guard symbol.

2009-02-04 Thread Paulo César Pereira de Andrade
  The solution should be simple. I used my "personal
style" of naming for include guards, but any other
symbol name should do it.

Paulo
>From 2e2ba17bbc5ef92fd52a85b53341651d79411332 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Wed, 4 Feb 2009 18:33:57 -0200
Subject: [PATCH] Janitor: change include/xkbsrv.h include guard symbol.

  It conflicts with .

  This is a minor "cosmetic" patch, as only a few input modules
should want to include both files. The actual symbol name should
not matter as long as there are no clashes.

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 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
___
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.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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 
and $sdkdir/xkbsrv.h both use the #ifndef _XKBSRV_H_ include guard?

Signed-off-by: Paulo Cesar Pereira de Andrade 
---
 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 
 #include 
 #include 
+
 #include "jstk.h"
 #include "jstk_key.h"
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
+#include 
+#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

xorg/driver/xf86-input-joystick: [PATCH 1/2] Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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 
---
 .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=],
+		[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-jamstudio: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  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.

>From 2fc48bb883fe624ebf52d5d8cc6050dbe644a127 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Wed, 4 Feb 2009 17:53:02 -0200
Subject: [PATCH] Janitor: make distcheck, .gitignore.

  Use an automatically generated ChangeLog instead of a hand written,
maintained one.
  Use a single toplevel .gitignore.
---
 .gitignore  |6 ++
 ChangeLog   |   45 -
 Makefile.am |9 +
 configure.ac|   15 +--
 man/.gitignore  |2 --
 src/.gitignore  |6 --
 src/Makefile.am |2 ++
 7 files changed, 26 insertions(+), 59 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..4e4d50a 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-jamstudio-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index e873cfc..000
--- a/ChangeLog
+++ /dev/null
@@ -1,45 +0,0 @@
-2006-04-06  Adam Jackson  
-
-	* configure.ac:
-	* src/js_x.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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 17e34c8..1bb1741 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=js_x
-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=js_x
+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 2221bbc..6a38358 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.freedesk

xorg/driver/xf86-input-hyperpen: [PATCH] Janitor: make distcheck, .gitignore.

2009-02-04 Thread Paulo César Pereira de Andrade
  The toplevel .gitignore extra entries are to
match those that earlier were from subdirectories,
and to include files left by make distcheck.

  Arguably, .gitignore should contain only patterns
also left after make clean. This should also be
discussed by the "janitors" :-)

Paulo
>From eca3c203074178e6f45cea6b49f86e5f99090ec4 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Wed, 4 Feb 2009 17:36:37 -0200
Subject: [PATCH] Janitor: make distcheck, .gitignore.

  Replace static ChangeLog with an automatically generated one.
  Use only one toplevel .gitignore.
  Correct a simple sparse warning.
---
 .gitignore |5 +
 ChangeLog  |   45 -
 Makefile.am|9 +
 configure.ac   |   15 +--
 man/.gitignore |2 --
 src/.gitignore |6 --
 src/Makefile.am|2 ++
 src/xf86HyperPen.c |2 +-
 8 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..1ef488b 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-input-hyperpen-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 2b5bb16..000
--- a/ChangeLog
+++ /dev/null
@@ -1,45 +0,0 @@
-2006-04-06  Adam Jackson  
-
-	* configure.ac:
-	* src/xf86HyperPen.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2005-12-20  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  
-
-	* 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 e7ccb89..dfdd78b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=hyperpen
-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=hyperpen
+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 dbb7ae0..e46b544 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@
diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
index bd630a5..8ed87f9 100644
--- a/src/xf86HyperPen.c
+++ b/src/xf86HyperPen.c
@@ -129,7 +129,7 @@ 

Re: xorg/app/xhost: [PATCH] Remove support for old kerberos5 api.

2009-02-04 Thread Paulo César Pereira de Andrade
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-evdev: [PATCH] Correct make distchek using the same solution used in other packages.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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=],
+		[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

xorg/app/xhost: [PATCH] Remove support for old kerberos5 api.

2009-02-04 Thread Paulo César Pereira de Andrade
  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 
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 
---
 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

Re: Current tinderbox regression (xhost)

2009-02-03 Thread Paulo César Pereira de Andrade
Daniel Stone wrote:
> Hi,

  Hi,

>>   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.
>
> Sorry, it wasn't due to no response to Peter's thing, it was in fact
> mostly separate and prompted by a few other things.

  I was somewhat pissed because I was believing I was doing
the right thing, that would be to not post very trivial patches
to the list to avoid unnecessary noise. And mainly because it
was clearly a single person taking a (well, don't know the
correct english word, lets try) "instinctive" decision; lifes
are lost due to these kinds of reactions...
  The other reason "I have been pissed" for quite some time,
is that I believe I am being a victim of some misunderstanding
or something, maybe because I am extremely shy :-) Talk to
anybody that knows me personally, I talk only the minimum
necessary :-) And maybe someone thought I am being "evil",
but yes, I am still an advocate of a GPL'ed "X Window System"

>>   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.

  Yes, in like over 100 packages of trivial patches, I committed
a mistake, that still passed my test condition (and would work for
any build using /usr is prefix).

>>   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.
>
> Your fd.o account should continue to work (please let me know if not)
> and I've added you as an ACL into the xedit repository.  Please
> continue to work, but send your patches to the list first or keep them
> in your own repository before pushing for review.

  Thanks. I just verified, and git pull works. But now it is too late
(I am a bad joker, and my jokes aren't fun, you can hate me for that
also :-)

  But seriously, today I did something I wanted to do for almost
one year (after my around 4 years away from X). I checked out
XFree86 4.8.0, and "ported" it to current Mandriva Linux, and was
finishing the process of building alternate packages for the
adventurous (they may be useful on things like custom OEMS), but,
not surprisingly, having binaries linked with Xorg libraries working
with XFree86 ones, or vice versa, may be a significantly hard task...

> Cheers,
> Daniel

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [PATCH] Add a prototype for CopyGetMasterEvent()

2009-02-03 Thread Paulo César Pereira de Andrade
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 
>> ---
>>  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: Current tinderbox regression (xhost)

2009-02-02 Thread Paulo César Pereira de Andrade
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: xf86-input-evdev: Changes to 'master'

2009-02-02 Thread Paulo César Pereira de Andrade
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: xf86-input-evdev: Changes to 'master'

2009-02-02 Thread Paulo César Pereira de Andrade
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: Current tinderbox regression (xhost)

2009-02-02 Thread Paulo César Pereira de Andrade
Chris Ball wrote:
> Hi,
>
>> commit c147fb417582e7384b5464bb53cfd492f9d7c69d
>> Author: Paulo Cesar Pereira de Andrade 
>> Date: Mon Feb 2 16:54:20 2009 -0200
>>
>> Remove old api kerberos.
>>
>> LibXau uses a 1993 kerberos api, but the X Server side
>> support has been already removed for quite some time.
>> This corrects bug report
>> https://bugs.freedesktop.org/show_bug.cgi?id=14684
>
> This breaks the xhost build:
>
> http://tinderbox.x.org/builds/2009-02-02-0029/logs/xhost/#build
>
> xhost.c: In function 'main':
> xhost.c:235: error: 'FamilyKrb5Principal' undeclared (first use in this
> function)

  The correction should be simple. The checking is under code
not protected by #ifdef K5AUTH

  Given that the kerberos5 support was removed from the X Server,
and the existing code appears to not have been compiled for several
years, and uses the old api, probably it should be better to also
just remove it from xhost. But the proper correction really would
be to update to current kerberos api...

> xhost.c:235: error: (Each undeclared identifier is reported only once
> xhost.c:235: error: for each function it appears in.)

  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...

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: autoreconf issue with libXfont

2009-02-02 Thread Paulo César Pereira de Andrade
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: Current tinderbox regression (xserver)

2009-01-29 Thread Paulo César Pereira de Andrade
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 

  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   

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Current tinderbox regression (libXi)

2009-01-29 Thread Paulo César Pereira de Andrade
Peter Hutterer wrote:
> On Fri, Jan 30, 2009 at 01:02:50AM -0200, Paulo César Pereira de Andrade
> wrote:
>> 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.
>
> Why didn't you release libXext as 1.1, as the version numbering would have
> suggested?

  I considered it, but I thought it would be unpolite to
"somehow" officially releasing your work without consulting
you. And I did it just to match the changes in xextproto,
so that build from tarballs will happen without problems.

> Adding support for GenericEvents in a patchlevel release doesn't make
> sense,
> especially considering the version number was already on 1.0.99.1 and you
> bumped it back.

  I thought there were no tarballs with the prototypes already
available, but it appears xextproto 7.0.4 already had the
prototypes, but no implementation in libXext 1.0.4...

> Also, git has this nice feature called branching, so if you desperately
> needed
> a 1.0.5 release, why didn't you just branch off 9884a41dd028 and
> cherry-pick
> the fixes over?

  I hope to not need to do this again soon (release a
libfoo due to releasing a minor change to fooproto).
But if needing that, branching for a "quick" release
would be a better option, so that it would not push
other changes, like the addition of Xge.c.

> Cheers,
>   Peter

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Current tinderbox regression (libXi)

2009-01-29 Thread Paulo César Pereira de Andrade
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   

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


[ANNOUNCE] libXext 1.0.5

2009-01-29 Thread Paulo César Pereira de Andrade
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kim Woelders (1):
  Bug #17774: Allocate the right size in XSyncListSystemCounters.

Paulo Cesar Pereira de Andrade (3):
  Janitor: Correct make distcheck and compiler warnings.
  patch to avoid gcc warning in libXext
  Xorg libXext Version 1.0.5.

Peter Hutterer (8):
  Add GenericEvent extension (XGE).
  Remove useless line in XGE that didn't do anything except segfaulting.
  Lock/Unlock in _xgeCheckExtInit(), and not in xgeGetExtensionVersion().
  Don't call _xgeCheckExtInit() from _xgeWireToEvent(). It will cause
a SIGABRT
  Xge: replace copyright with standard template from xserver,
whitespace fixes.
  Xge: Replace XExtensionVersion with XGEVersionRec.
  Require xproto 7.0.13, xextproto 7.0.3 and xlib 1.1.99.1.
  Bump to 1.0.99.1

git tag: libXext-1.0.5

http://xorg.freedesktop.org/archive/individual/lib/libXext-1.0.5.tar.bz2
MD5: aa11d859cc8e9a0bad3bb55e1666547b  libXext-1.0.5.tar.bz2
SHA1: 926c7237108aaccbb8e437ebd80b8edc67615249  libXext-1.0.5.tar.bz2

http://xorg.freedesktop.org/archive/individual/lib/libXext-1.0.5.tar.gz
MD5: 6e5efc4ec4c5487f657c3f923fa58067  libXext-1.0.5.tar.gz
SHA1: fa583b6be0b7c623276b85dbfde58d68bb28d8ee  libXext-1.0.5.tar.gz

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmCMPIACgkQPdKBRUa20MAHbwCfcJdayS74hoPwW0dBGJOgDPnF
UZAAn0MVGkDXIQNvR1OKaU4Ki5TeJy4C
=oex3
-END PGP SIGNATURE-

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Current tinderbox regression (libXext)

2009-01-29 Thread Paulo César Pereira de Andrade
Chris Ball wrote:
> http://tinderbox.x.org/builds/2009-01-29-0028/logs/libXext/#build
>
> extutil.c:262: error: conflicting types for 'XSetExtensionErrorHandler'
> /home/cjb/xorg-build/include/X11/extensions/Xext.h:41: error: previous
> declaration of 'XSetExtensionErrorHandler' was here
> extutil.c: In function 'XMissingExtension':
> extutil.c:281: warning: passing argument 2 of 'func' discards qualifiers
> from pointer target type

  Tinderbox was updated in the window of time I had still only
pushed the newer xextproto. (It took me some extra minutes as I
gone help someone here to correct his X problems :-)

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


[ANNOUNCE] xextproto 7.0.5

2009-01-29 Thread Paulo César Pereira de Andrade
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Julien Cristau (2):
  COPYING: add Peter Hutterer's license and copyright notice
  Add geproto.txt to EXTRA_DIST

Paulo Cesar Pereira de Andrade (2):
  Janitor: Correct make distcheck and dont distribute autogen.sh
  Bump to libXext Version 7.0.5.

git tag: xextproto-7.0.5

http://xorg.freedesktop.org/archive/individual/proto/xextproto-7.0.5.tar.bz2
MD5: e6841018a7c64983b0954aa2c564d115  xextproto-7.0.5.tar.bz2
SHA1: d62e704039e7c647da66c9a6531ebdede37dace8  xextproto-7.0.5.tar.bz2

http://xorg.freedesktop.org/archive/individual/proto/xextproto-7.0.5.tar.gz
MD5: f6274c778e571130484fb0650651ac02  xextproto-7.0.5.tar.gz
SHA1: d16db4ecbdf4a177013c097c98339ea15700e2b2  xextproto-7.0.5.tar.gz

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmB9c0ACgkQPdKBRUa20MBWBwCdFo5kFOGFXRFJntZNoOtT/umX
4L8AnjdiLmXJxI+Z91AO98tW5jJm1Sm0
=HKey
-END PGP SIGNATURE-

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Recent input changes

2009-01-28 Thread Paulo César Pereira de Andrade
Alan Coopersmith wrote:
> Jeff Chua wrote:
>> On Sun, Jan 25, 2009 at 4:55 AM, Joel Feiner  wrote:
>>> xf86-input-keyboard also doesn't build with similar errors:
 kbd.c:567: warning: passing argument 1 of 'InitKeyboardDeviceStruct'
 from incompatible pointer type
 kbd.c:567: warning: passing argument 2 of 'InitKeyboardDeviceStruct'
 from incompatible pointer type
 kbd.c:567: warning: passing argument 3 of 'InitKeyboardDeviceStruct'
 from incompatible pointer type
 kbd.c:567: warning: passing argument 4 of 'InitKeyboardDeviceStruct'
 from incompatible pointer type
 kbd.c:567: error: too many arguments to function
 'InitKeyboardDeviceStruct'
 kbd.c: In function 'PostKbdEvent':
 kbd.c:699: error: 'KeyClassRec' has no member named 'state'
 kbd.c:702: error: 'KeyClassRec' has no member named 'state'
 kbd.c:714: error: 'KeyClassRec' has no member named 'state'
 kbd.c:726: error: 'KeyClassRec' has no member named 'curKeySyms'
 kbd.c:727: error: 'KeyClassRec' has no member named 'curKeySyms'
 kbd.c:728: error: 'KeyClassRec' has no member named 'curKeySyms'
 kbd.c:791: error: 'KeyClassRec' has no member named 'modifierMap'
 kbd.c:847: error: 'KeyClassRec' has no member named 'modifierMap'
 kbd.c:854: error: 'KeyClassRec' has no member named 'modifierKeyMap'
 kbd.c:854: error: 'KeyClassRec' has no member named
 'maxKeysPerModifier'
 kbd.c:857: error: 'KeyClassRec' has no member named 'modifierKeyMap'
 kbd.c:857: error: 'KeyClassRec' has no member named
 'maxKeysPerModifier'
 kbd.c: At top level:
 kbd.c:863: warning: 'ModuleInfoRec' is deprecated
>>
>> Any fix for this? I've tried the latest xserver. Compile fine. But
>> xf86-input-keyboard still failed to compiled. Have tried with
>> --disable-xnest, but still failed.
>
> You might try applying
> http://people.freedesktop.org/~daniels/kbd-pass-the-absinthe.diff
> but that's probably no more tested than the other recent XKB changes.

  I just made a somewhat simpler version, that from some basic
tests only misses autorepeat, but I did not follow the code to
see how to actually set the repeat and intervals.
  Maybe should be on the KeybdCtrl defaultKeyboardControl, as I
don't know if there is an api for calling it..., but would look
ugly to set that global variable, so, left as an exercise to
whoever wants to finish the patch; I am using evdev...


  Hint on how I did test the patch, and some intermediate versions
that would fail to load due to unresolved symbols; add to
/etc/X11/xorg.conf something like:
-%<-
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
EndSection

Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
   Option "CoreKeyboard"
EndSection
-%<-

and to Section "ServerLayout":
-%<-
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
-%<-

and to Section "ServerFlags":
-%<-
Option "AutoEnableDevices" "True"
Option "AutoAddDevices" "False"
-%<-

  Then, run something like:
% startx & sleep 15; killall X

If you have a ssh access, it will be easier...
Then, you may also need to run from a xterm something like:
% setxkbmap -rules xorg us_intl


Paulo


xf86-input-keyboard-git-master.patch
Description: Binary data
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: XkbGetCoreMap

2009-01-28 Thread Paulo César Pereira de Andrade
Pierre Willenbrock wrote:
> Hi,

  Hi,

> i think there are a few things wrong in XkbGetCoreMap. It looks like
> there is some code that was duplicated(judging from a hanging xserver
> and the predecessor function), an off-by-one in the size calculation and
> some uninitilized members of the KeySymsRec. I am not sure about the
> latter, but if these members should not be set, they probably should be
> removed from KeySymsRec.

  I git bisect'ed to that code last night, as one possible cause of
 http://bugs.freedesktop.org/show_bug.cgi?id=19776
but I did not debug it, just looked over the changes; I will try
your patch, it makes sense, and hopefully will correct my problem
(not having a functional text editor is hard...)

> Patch attached.
>
> Regards,
>   Pierre

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: xserver: Branch 'master'

2009-01-27 Thread Paulo César Pereira de Andrade
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 
> 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

2009-01-25 Thread Paulo César Pereira de Andrade
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+ 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: Recent input changes

2009-01-25 Thread Paulo César Pereira de Andrade
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+ 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  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: [PATCH] Wait for hald during initialization when necessary

2009-01-22 Thread Paulo César Pereira de Andrade
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: Current tinderbox regression (app/xkbcomp)

2009-01-21 Thread Paulo César Pereira de Andrade
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   

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [PATCH] Wait for hald during initialization when necessary

2009-01-21 Thread Paulo César Pereira de Andrade
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 
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: [PATCH] Wait for hald during initialization when necessary

2009-01-21 Thread Paulo César Pereira de Andrade
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] Add hal/dbus fallback when not able to talk to hal/dbus daemons.

2009-01-20 Thread Paulo César Pereira de Andrade
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: Current tinderbox regression (xserver)

2009-01-20 Thread Paulo César Pereira de Andrade
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


[PATCH] Add hal/dbus fallback when not able to talk to hal/dbus daemons.

2009-01-20 Thread Paulo César Pereira de Andrade
  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 
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

Re: xorg server should wait HAL if it's not avail during init

2009-01-20 Thread Paulo César Pereira de Andrade
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


Re: Font rendering problem in 1.6 branch (fine in 1.5 and master)

2009-01-17 Thread Paulo César Pereira de Andrade
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
>>  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)

2009-01-14 Thread Paulo César Pereira de Andrade
Dan Nicholson wrote:
> On Wed, Jan 14, 2009 at 5:14 AM, Jens Stroebel  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


Re: DESTDIR and pkg-config variables

2009-01-12 Thread Paulo César Pereira de Andrade
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//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//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


DESTDIR and pkg-config variables

2009-01-12 Thread Paulo César Pereira de Andrade
  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: [Brainstorm] LinkKit for Xorg

2009-01-10 Thread Paulo César Pereira de Andrade
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


[Brainstorm] LinkKit for Xorg

2009-01-09 Thread Paulo César Pereira de Andrade
  In XFree86 3.x there was a LinkKit, that basically
consisted of a distribution of object files, that could
be linked into a binary by the user and/or system
configuration.

  Personally, at that time, I used it a lot, as I was
running a low end computer, and LinkKit could make
running XFree86 on a computer with like 8MB main
memory, and a card with 256Kb memory "smoothly".

  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.

  This is just brainstorming, but something I thought
some time ago; instead of having a xorg.conf as a
configuration file, it, or an alternate name, could
be a makefile, and then one could choose what driver
and features to link into it.

  Any comments?

Thanks,
Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


XaaNoOffscreenPixmaps option - plus a PATCH

2009-01-08 Thread Paulo César Pereira de Andrade
  Hi,

  I believe there are other reasons for XaaNoOffscreenPixmaps,
but I suspect some of them are due to "unknown bugs", while
others may be just that offscreen memory management is not
done by the "xf86 fb manager".

  The attached patch is an example of a case that is probably
better corrected in the driver itself, and I think should not
be applied :-)

  Anyway, shouldn't it be corrected in another schema when
using an alternate memory manager for example? So that pixmaps
can reside in offscreen memory, instead of main memory...

Paulo
>From d9334dd8de72dae0d7185d19bfd5e7f4caf80f7a Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Thu, 8 Jan 2009 15:31:34 -0200
Subject: [PATCH] Add Xaa CopyAreaFlags SYNC_BEFORE_SCREEN_COPY

  This flag is intended for use with hardware that supports only either
positive X screen copy, or sign X == sign Y screen copy, and have a
limited fifo.
---
 hw/xfree86/xaa/XAA.HOWTO|5 +
 hw/xfree86/xaa/xaa.h|5 +++--
 hw/xfree86/xaa/xaaCpyArea.c |   29 -
 3 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/hw/xfree86/xaa/XAA.HOWTO b/hw/xfree86/xaa/XAA.HOWTO
index cbd71c1..1d0b05c 100644
--- a/hw/xfree86/xaa/XAA.HOWTO
+++ b/hw/xfree86/xaa/XAA.HOWTO
@@ -185,6 +185,11 @@ descriptions of those primitives below.
   This indicates that the hardware can only cope with blitting when
   the direction of x is the same as the direction in y.
 
+SYNC_AFTER_SUBSEQUENT_SCREEN_COPY
+
+  This indicates that the hardware must be sync'ed before subsequent
+  screen copies.
+
 
 void SetupForScreenToScreenCopy( ScrnInfoPtr pScrn,
 			int xdir, int ydir,
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 7db6b95..a83f6eb 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -3,7 +3,7 @@
 #define _XAA_H
 
 #define XAA_VERSION_MAJOR   1
-#define XAA_VERSION_MINOR   2
+#define XAA_VERSION_MINOR   3
 #define XAA_VERSION_RELEASE 1
 
 /*
@@ -28,7 +28,7 @@
 -   
 23   ONLY_LEFT_TO_RIGHT_BITBLT
 22   ONLY_TWO_BITBLT_DIRECTIONS
-21 .
+21   SYNC_BEFORE_SCREEN_COPY
 20 .
 19 .
 18 .
@@ -159,6 +159,7 @@
 /* copyarea flags */
 #define ONLY_TWO_BITBLT_DIRECTIONS	0x0040
 #define ONLY_LEFT_TO_RIGHT_BITBLT	0x0080
+#define SYNC_BEFORE_SCREEN_COPY		0x0020
 
 /* line flags */
 #define LINE_PATTERN_LSBFIRST_MSBJUSTIFIED	0x0080
diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c
index 6a898cd..b7cf2f2 100644
--- a/hw/xfree86/xaa/xaaCpyArea.c
+++ b/hw/xfree86/xaa/xaaCpyArea.c
@@ -286,11 +286,14 @@ XAAScreenToScreenBitBlt(
 (*infoRec->SetupForScreenToScreenCopy)(pScrn,
 1, ydir, alu, planemask, -1);
 for (; nbox; pbox++, pptSrc++, nbox--)
-if (pptSrc->y != pbox->y1 || pptSrc->x >= pbox->x1)
+if (pptSrc->y != pbox->y1 || pptSrc->x >= pbox->x1) {
 /* No problem. Do a xdir = 1 blit instead. */
+		if (infoRec->CopyAreaFlags & SYNC_BEFORE_SCREEN_COPY)
+		(*infoRec->Sync)(infoRec->pScrn);
 (*infoRec->SubsequentScreenToScreenCopy)(pScrn,
 pptSrc->x, pptSrc->y, pbox->x1, pbox->y1,
 pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
+	}
 else 
 {
 /*
@@ -306,18 +309,24 @@ XAAScreenToScreenBitBlt(
 extra = w % stripeWidth;
 
 /* First, take care of the little bit on the far right */
-if (extra)
+if (extra) {
+		if (infoRec->CopyAreaFlags & SYNC_BEFORE_SCREEN_COPY)
+			(*infoRec->Sync)(infoRec->pScrn);
 (*infoRec->SubsequentScreenToScreenCopy)(pScrn,
 pptSrc->x + fullStripes * stripeWidth, pptSrc->y,
 pbox->x1 + fullStripes * stripeWidth, pbox->y1,
 extra, pbox->y2 - pbox->y1);
+		}
 
 /* Now, take care of the rest of the blit */
-for (i = fullStripes - 1; i >= 0; i--)
+for (i = fullStripes - 1; i >= 0; i--) {
+		if (infoRec->CopyAreaFlags & SYNC_BEFORE_SCREEN_COPY)
+			(*infoRec->Sync)(infoRec->pScrn);
 (*infoRec->SubsequentScreenToScreenCopy)(pScrn,
 pptSrc->x + i * stripeWidth, pptSrc->y,
 pbox->x1 + i * stripeWidth, pbox->y1,
 stripeWidth, pbox->y2 - pbox->y1);
+		}
 }
 SET_SYNC_FLAG(infoRec);
 return;
@@ -336,6 +345,8 @@ XAAScreenToScreenBitBlt(
 -1, -1, alu, planemask, -1);
 dirsetup = -1;
 }
+	if (infoRec->CopyAreaFlags & SYNC_BEFORE_SCREEN_COPY)
+		(*infoRec->Sync)(infoRec->pScrn);
 (*infoRec->SubsequentScreenToScreenCopy)(pScrn,pptSrc->x, pptSrc->y,
 pbox->x

[ANNOUNCE] xf86-input-keyboard 1.3.2

2009-01-07 Thread Paulo César Pereira de Andrade
-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


Re: xserver: Branch 'master'

2009-01-07 Thread Paulo César Pereira de Andrade
Daniel Stone wrote:
> On Mon, Jan 05, 2009 at 11:25:11AM -0800, Paulo Cesar Pereira de Andrade
> wrote:
>> -extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
>> +extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
>
> ?!?

  If the symbols are in a installed sdk header, they presumably
must be exported. I feel that vector could be static in xace.c,
but if it must be used by other shared objects, it would still
be required at least a function returning a pointer to a callback.

  In the commit I also wrote about using a format like:
extern /* NOEXPORT */ type name ...;
to let people know it is in the public sdk header, but not meant
to be used by other shared objects, and what would be the proper
solution, that is to have a private header for these cases.

  The XaceHook() function must be exported, or at least extmod
will fail due to it being an unresolved symbol.

  Also note that if you configure with --disable-visibility, or
the compiler doesn't support it, that symbol would be available
anyway.

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

2009-01-06 Thread Paulo César Pereira de Andrade
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: [PATCH] Default to use standard fonts and builtin fonts as a fallback

2009-01-06 Thread Paulo César Pereira de Andrade
[...]
>> 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)

Paulo
>From 2e039dfaba142211ec9aa11fd0314b0e889d5669 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade 
Date: Tue, 6 Jan 2009 20:34:30 -0200
Subject: [PATCH] Default to use standard bitmap fonts, with builtins as fallback

  The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
  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 |3 ---
 hw/xfree86/common/xf86Config.c |   25 -
 include/dixfont.h  |5 +
 4 files changed, 17 insertions(+), 24 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..b0fbed2 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1906,12 +1906,9 @@ InitFonts (void)
 {
 patternCache = MakeFontPatternCache();
 
-#ifdef BUILTIN_FONTS
 BuiltinRegisterFpeFunctions();
-#else
 FontFileRegisterFpeFunctions();
 fs_register_fpe_functions();
-#endif
 }
 
 int
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 48d8efd..de984d4 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -590,6 +590,7 @@ configFiles(XF86ConfFilesPtr fileconf)
   int countDirs;
   char *temp_path;
   char *log_buf;
+  char *end;
 
   /* FontPath */
   /* Try XF86Config FontPath first */
@@ -610,17 +611,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,10 +644,17 @@ configFiles(XF86ConfFilesPtr fileconf)
}
   }
 
-  /* If defaultFontPath is still empty, exit here */
-
-  if (! *defaultFontPath)
-FatalError("No valid FontPath could be found.");
+  temp_path = strstr(defaultFontPath, "built-ins");
+  end = temp_path + strlen("built-ins");
+  /* if "built-ins" not already in defaultFontPath */
+  if (temp_path == NULL ||
+  ((temp_path != defaultFontPath || temp_path[-1] != ',') &&
+   (!*end || *end != ',')))
+   /* defaultFontPath should really, by default, be initialized to a copy
+* of COMPILEDDEFAULTFONTPATH, so that one would know it can free'd
+* before assignment here... */
+defaultFontPath = Xprintf("%s%sbuilt-ins", defaultFontPath,
+			  *defaultFontPath ? "," : "");
 
   /* make fontpath more readable in the logfiles */
   countDirs = 1;
diff --git a/include/dixfont.h b/include/dixfont.h
index 97bd712..fd44477 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -143,6 +143,11 @@ extern _X_EXPORT void InitGlyphCaching(void);
 extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/);
 
 /*
+ * libXfont/src/builtins/builtin.h
+ */ 
+extern _X_EXPORT void BuiltinRegisterFpeFunctions(void);
+
+/*
  * libXfont stubs.
  */
 extern _X_EXPORT int client_auth_generation(ClientPtr client);
-- 
1.6.0.5
___
xorg mailing list
xorg@lists.freedes

Re: [PATCH] Default to use standard fonts and builtin fonts as a fallback

2009-01-06 Thread Paulo César Pereira de Andrade
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  OpenPGP: 1024D/ED7DAEA6

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [should have been: ANNOUNCE: libICE 1.0.5]

2009-01-06 Thread Paulo César Pereira de Andrade
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


[no subject]

2009-01-06 Thread Paulo César Pereira de Andrade
-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


[PATCH] Default to use standard fonts and builtin fonts as a fallback

2009-01-06 Thread Paulo César Pereira de Andrade
  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 
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 = 

Re: xserver distribution missing sdksyms.sh

2009-01-05 Thread Paulo César Pereira de Andrade
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: [Cooker] x3270 fonts

2009-01-05 Thread Paulo César Pereira de Andrade
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: [PATCH] fix sdksyms for gcc3

2009-01-02 Thread Paulo César Pereira de Andrade
Daniel Stone wrote:
> Hi,

  Hi,

>> extern _X_EXPORT  
>> 
>
> I'm pretty troubled by this.  If it's C, then it's C.  If it's not C,
> then it's not C.  Pseudo-C, OTOH ...

  I believe this is one of the possible easiest approaches. The C
source files are filled with symbols defined by macro expansions,
usually generated by multiple inclusion of .c and .h files. So it
should be reasonable to require a "cleanly" specified symbol in
a sdk header. Prepending "extern _X_EXPORT" to declaration of
symbols that should be made available to external (possibly third
party) modules can be seem as a kind of "compromise", but it may
still take some time to have binary, backward compatible modules.
Not in the sense of "encouraging" distribution of binary only
modules, but in the sense of not breaking working code. Luckly
at least for now, binaries for one distro work on another, when
using same kernel and Xorg...

>>   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...
>
> Arguably, the proper solution is an actual (gasp!) linker script to
> manage our so-called API.  Either way, I'm pretty sure that putting half
> of Xorg into a shared library just because we haven't figured out
> linking yet, is not the way forward.

  One could also just pick a few symbols, and "ld -u" them, so that
the linker would not find "unreachable" symbols. sdksyms.* just uses
"another approach", and references all symbols exported in the sdk.
  Actually, since Xorg is already using libtool, it would be just
more practical to also use libtool dependencies. The problem is that
it is kind of a "can of worms", and touching that may cause several
"temporary" problems.

> Cheers,
> Daniel

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [PATCH] fix sdksyms for gcc3

2009-01-02 Thread Paulo César Pereira de Andrade
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   

  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'

2009-01-01 Thread Paulo César Pereira de Andrade
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 
>> 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

2008-12-29 Thread Paulo César Pereira de Andrade
-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 
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.
  Disable HW cursor in dua

Re: [PATCH] Include sdk header dependencies and protect agains't multiple inclusion.

2008-12-17 Thread Paulo César Pereira de Andrade
Thomas Dickey wrote:
> On Wed, Dec 17, 2008 at 06:23:09PM -0200, Paulo César Pereira de Andrade
> wrote:
>>   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 
>> #endif
>
> It's failure-prone, and increases the amount of work for developers.
> I didn't see any figures on how much faster the build would be,
> to compensate for this.

  The  headers are {xkb,dix,xorg}-config.h, and they
declare things like:
#define XF86VIDMODE 1
#define XINERAMA 1
#define DRI2 1

  But (most of) those are "moved" to xorg-server.h in an installed
sdk.

  I don't think the compiler parsing a few extra lines will have
much of an impact on compile time. And still, if one would need
to choose to have the compile time increase by 1% but make it
easier to manage the sources, it would be preferable.

  About those:
#define FEATURE 1
I think they should also be reworked to have enough fallbacks/stubs
to not cause a failure due to things like missing symbols. The
driver should be compiled with the proper sdk headers, but that is
not always the case...

> --
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

Paulo

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [PATCH] Include sdk header dependencies and protect agains't multiple inclusion.

2008-12-17 Thread Paulo César Pereira de Andrade
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 
#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

#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

2008-12-12 Thread Paulo César Pereira de Andrade
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

2008-12-11 Thread Paulo César Pereira de Andrade
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


  1   2   >