Re: [PATCH] hw/xwin: link dynamically and export symbols

2014-04-22 Thread Yaakov (Cygwin/X)

On 2014-04-22 00:18, Keith Packard wrote:

Yaakov (Cygwin/X) writes:

From: Yaakov Selkowitz

With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.


I don't think there's a libXfont released with this yet?


Not yet, this is just for review; the pull request will come through Jon 
TURNEY's tree when ready.



Yaakov
Cygwin/X

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: Xwayland DDX: build breaks in configuration

2014-04-06 Thread Yaakov (Cygwin/X)

On 2014-04-06 01:11, Keith Packard wrote:

Gaetan Nadon writes:


 If wayland-scanner.m4 is missing, the WAYLAND_SCANNER_RULES macro is
 undefined, and this token ends up in the generated configure script.
 This makes autogen.sh (or autoreconf) succeed, but configure fail.


Any idea how to fix this? I would prefer that the RC I'm still trying to
construct will build for most people...


Adding a copy of wayland-scanner.m4 to m4/ should work.


Yaakov
Cygwin/X

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xfs] Fix CFLAGS and LDFLAGS for Cygwin/MinGW

2014-04-06 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

As in xserver, FD_SETSIZE must be overridden due to a too-low default,
and symbols must be exported for compatibility with the shared libXfont
stub handling on these platforms.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index e604555..e00fee4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,12 @@ AC_CHECK_FUNCS([daemon])
 #  - xfont = 1.4.5 required for matching MakeAtom prototypes in fontmisc.h
 PKG_CHECK_MODULES(XFS, xproto = 7.0.17 xfont = 1.4.5 xtrans)
 
+case $host_os in
+  cygwin*|mingw*)
+CFLAGS=$CFLAGS -DFD_SETSIZE=256
+LDFLAGS=$LDFLAGS -Wl,--export-all ;;
+esac
+
 # Transport selection macro from xtrans.m4
 XTRANS_CONNECTION_FLAGS
 
-- 
1.8.5.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH libXfont] Make shared library work on Cygwin/MinGW

2014-04-06 Thread Yaakov (Cygwin/X)

On 2014-04-06 14:41, Yaakov (Cygwin/X) wrote:

From: Yaakov Selkowitz 
yselkowitz-rn4veauk+akrv+lv9mx5uipxlwaov...@public.gmane.org

Weak symbols on PE platforms do not work the same way as on ELF
platforms, hence we have been unable to have a fully functional shared
libXfont until now.  This patch works around these issues so that we
can fix that.

In summary, only when compiling shared libraries on NO_WEAK_SYMBOLS
platforms, when the first stub is called, the invoking program is first
checked to determine if it exports the stubbed functions.  Then, for
every stub call, if the function is exported by the loader, it is called
instead of the stub code.

serverClient and serverGeneration are data pointers, and therefore are
replaced by getter functions. ErrorF is variadic, so the override is
routed through VErrorF instead. FatalError has no va_list equivalent,
but it is not actually used in libXfont and therefore should be safe to
remove.

This requires all X servers to export their symbols, which requires
forthcoming patches for hw/xwin and xfs; the other xservers (including
tigervnc) already do this via LD_EXPORT_SYMBOLS_FLAG.


Almost forgot:

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] hw/xwin: link dynamically and export symbols

2014-04-06 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xwin/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index b4fa663..df920eb 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -155,7 +155,7 @@ XWIN_LIBS +=
$(top_builddir)/pseudoramiX/libPseudoramiX.la
 XWin_DEPENDENCIES = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) 
$(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS)
 XWin_LDADD= $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) 
$(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS) \
 $(CLIPBOARD_LIBS) $(XWIN_GLX_SYS_LIBS) $(XSERVER_SYS_LIBS) 
$(XWIN_SYS_LIBS) $(MULTIWINDOW_SYS_LIBS)
-XWin_LDFLAGS = -mwindows -static -Wl,--disable-stdcall-fixup
+XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG)
 
 .rc.o:
$(AM_V_GEN)$(WINDRES) --use-temp-file -i $ --input-format=rc -o $@ -O 
coff -I $(top_builddir)/include -DHOST_TRIPLET=\$(host)\
-- 
1.8.5.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH xfs] Fix CFLAGS and LDFLAGS for Cygwin/MinGW

2014-04-06 Thread Yaakov (Cygwin/X)

On 2014-04-06 18:31, Gaetan Nadon wrote:

On 14-04-06 03:45 PM, Yaakov (Cygwin/X) wrote:

+case $host_os in
+  cygwin*|mingw*)
+CFLAGS=$CFLAGS -DFD_SETSIZE=256
+LDFLAGS=$LDFLAGS -Wl,--export-all ;;
+esac

We are not supposed to clobber user variables like CFLAGS. I didn't look
at the particular cygwin environment, maybe it is already hopelessly
clobbered, or there is no other way, but if not, it would be better not
to start.

The only time we have to do it is during a configuration test where we
use save_CFLAGS=$CFLAGS and then restore it after the test. The goal
is to allow the user to easily override the compiler flags established
in the makefile, as the user has the final say in all this.


You're referring to using CFLAGS instead of AM_CFLAGS in automake files. 
 This is appending to (not clobbering) CFLAGS at the configure level, 
which still allows the user to override the settings during make (even 
though it would be a bad idea if they left out these flags).



Yaakov
Cygwin/X

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xproto] Xthreads.h: Declare _Xthread_init for WIN32

2013-11-21 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This fixes the build of libXt on *-*-mingw* with -Werror=implicit.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xthreads.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Xthreads.h b/Xthreads.h
index 3d44208..2027127 100644
--- a/Xthreads.h
+++ b/Xthreads.h
@@ -107,6 +107,7 @@ typedef struct {
 struct _xthread_waiter *waiters;
 } xcondition_rec;
 typedef CRITICAL_SECTION xmutex_rec;
+extern void _Xthread_init(void);
 #define xthread_init() _Xthread_init()
 #define xthread_self GetCurrentThreadId
 #define xthread_fork(func,closure) { \
-- 
1.8.3.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PULL] warning fixes, libnettle SHA1

2012-11-05 Thread Yaakov (Cygwin/X)
Keith,

The following changes since commit 04f980ead5e9af066143a921e0a0e98f26f28ee5:

  Merge remote-tracking branch 'jturney/mingw-w64-w32api' (2012-11-05 08:45:21 
-0800)

are available in the git repository at:

  git://people.freedesktop.org/~yselkowitz/xserver.git master

for you to fetch changes up to 54ba26cb1f9c59559cc3c449abeb31b2ce23bdba:

  os: Add libnettle as a choice of SHA1 implementation (2012-11-05 13:34:18 
-0600)


Yaakov Selkowitz (14):
  macros: clarify documentation
  xfree86: os-support: fix old-style function definition warnings
  dix: fix redundant redeclaration warnings in dixfont
  dix: fix shadow warnings
  fb: fix shadow warnings
  mi: fix shadow warnings
  randr: export more provider property symbols
  render: fix shadow warnings
  xkb: fix shadow warnings
  Xext: fix unused variable warnings in xf86bigfont.c
  Xext: fix redundant redeclaration warnings
  Xext: fix shadow warnings
  Xi: fix fprint format warning
  os: Add libnettle as a choice of SHA1 implementation

 Xext/panoramiX.c   |2 -
 Xext/shm.c |   10 +++---
 Xext/xace.c|   12 
 Xext/xf86bigfont.c |   12 ---
 Xext/xres.c|2 -
 Xext/xtest.c   |2 -
 Xi/exevents.c  |2 +-
 configure.ac   |   14 -
 dix/dixfonts.c |9 +
 dix/events.c   |   24 +++---
 fb/fbblt.c |   12 
 fb/fbbltone.c  |8 ++--
 hw/xfree86/os-support/bus/nobus.c  |2 +-
 hw/xfree86/os-support/shared/agp_noop.c|2 +-
 hw/xfree86/os-support/shared/ioperm_noop.c |4 +-
 hw/xfree86/os-support/stub/stub_init.c |6 ++--
 hw/xfree86/sdksyms.sh  |1 +
 include/Makefile.am|2 +-
 include/dix-config.h.in|3 ++
 include/dix.h  |   12 
 include/dixfont.h  |   39 +---
 include/dixfontstubs.h |   45 
 mi/mibitblt.c  |6 ++--
 mi/mispans.c   |4 --
 os/xsha1.c |   30 ++
 randr/randrstr.h   |8 +
 render/picturestr.h|8 ++--
 xkb/ddxList.c  |2 -
 xkb/xkb.c  |   27 
 xkb/xkbPrKeyEv.c   |4 +-
 xkb/xkbtext.c  |1 -
 xkb/xkmread.c  |2 -
 xorg-server.m4 |6 ++--
 33 files changed, 183 insertions(+), 140 deletions(-)
 create mode 100644 include/dixfontstubs.h


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH libxcwm 03/15] Ignore .libs

2012-11-05 Thread Yaakov (Cygwin/X)
On Mon, 2012-11-05 at 22:43 +, Jon TURNEY wrote:
 diff --git a/.gitignore b/.gitignore
 index 58df93d..a484160 100644
 --- a/.gitignore
 +++ b/.gitignore
 @@ -20,6 +20,7 @@ hooks
  *.o
  *.lo
  *la
 +.libs
  
  # Ignore latex intermediate files
  *.aux

I suggest using the standard X.Org .gitignore instead.


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] os: Add libnettle as a choice of SHA1 implementation

2012-10-30 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

libnettle is smaller than libgcrypt, currently being released more
frequently, and has replaced the latter in gnutls-3.x (which is used
by TigerVNC, so they can avoid pulling in two crypto libraries
simultaneously).

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac|   14 +-
 include/dix-config.h.in |3 +++
 os/xsha1.c  |   30 ++
 3 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index e686614..758c4b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1360,7 +1360,7 @@ CORE_INCS='-I$(top_srcdir)/include 
-I$(top_builddir)/include'
 
 # SHA1 hashing
 AC_ARG_WITH([sha1],
-
[AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
+
[AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
 [choose SHA1 implementation])])
 AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
 if test x$with_sha1 = x  test x$HAVE_SHA1_IN_LIBC = xyes; then
@@ -1423,6 +1423,18 @@ if test x$with_sha1 = xlibsha1; then
  [Use libsha1 for SHA1])
SHA1_LIBS=-lsha1
 fi
+AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes])
+if test x$with_sha1 = x  test x$HAVE_LIBNETTLE = xyes; then
+   with_sha1=libnettle
+fi
+if test x$with_sha1 = xlibnettle  test x$HAVE_LIBNETTLE != xyes; then
+   AC_MSG_ERROR([libnettle requested but not found])
+fi
+if test x$with_sha1 = xlibnettle; then
+   AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1],
+ [Use libnettle SHA1 functions])
+   SHA1_LIBS=-lnettle
+fi
 AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes])
 if test x$with_sha1 = x  test x$HAVE_LIBGCRYPT = xyes; then
with_sha1=libgcrypt
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 578f249..b270a32 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -157,6 +157,9 @@
 /* Define to use libgcrypt SHA1 functions */
 #undef HAVE_SHA1_IN_LIBGCRYPT
 
+/* Define to use libnettle SHA1 functions */
+#undef HAVE_SHA1_IN_LIBNETTLE
+
 /* Define to use libsha1 for SHA1 */
 #undef HAVE_SHA1_IN_LIBSHA1
 
diff --git a/os/xsha1.c b/os/xsha1.c
index fa66c7a..24c0aa2 100644
--- a/os/xsha1.c
+++ b/os/xsha1.c
@@ -116,6 +116,36 @@ x_sha1_final(void *ctx, unsigned char result[20])
 return 1;
 }
 
+#elif defined(HAVE_SHA1_IN_LIBNETTLE)   /* Use libnettle for SHA1 */
+
+#include nettle/sha.h
+
+void *
+x_sha1_init(void)
+{
+struct sha1_ctx *ctx = malloc(sizeof(*ctx));
+
+if (!ctx)
+return NULL;
+sha1_init(ctx);
+return ctx;
+}
+
+int
+x_sha1_update(void *ctx, void *data, int size)
+{
+sha1_update(ctx, size, data);
+return 1;
+}
+
+int
+x_sha1_final(void *ctx, unsigned char result[20])
+{
+sha1_digest(ctx, 20, result);
+free(ctx);
+return 1;
+}
+
 #elif defined(HAVE_SHA1_IN_LIBGCRYPT)   /* Use libgcrypt for SHA1 */
 
 #include gcrypt.h
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: MinGW build fixes for various applications

2012-10-30 Thread Yaakov (Cygwin/X)
On Mon, 2012-10-29 at 13:38 +, Jon TURNEY wrote:
 MinGW build fixes for some applications which are relatively simple to fix.
 
 xauth:
 
 Jon TURNEY (1):
   Include Xwinsock.h rather than sys/socket.h on WIN32
 
 xdpyinfo:
 
 Jon TURNEY (1):
   Include Xwindows.h on WIN32 to avoid type clashes
 
 xkbcomp:
 
 Ryan Pavlik (1):
   Include Xwindows.h rather than windows.h
 
 xmodmap:
 
 Jon TURNEY (1):
   Include X11/Xwindows.h on WIN32
 
 xrdb:
 
 Jon TURNEY (1):
   Fix build with WIN32 defined, but PATHETICCPP not defined
 
 xset:
 
 Jon TURNEY (1):
   Remove unneeded include of windows.h on WIN32

For the series:

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH libXfont] Omit catalogue support on systems without symlinks

2012-10-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac |2 +-
 src/fontfile/catalogue.c |4 
 src/fontfile/register.c  |2 ++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index b274a8f..ee3f7af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ XORG_CHECK_SGML_DOCTOOLS(1.7)
 AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
 
 # Checks for library functions.
-AC_CHECK_FUNCS([poll])
+AC_CHECK_FUNCS([poll readlink])
 
 # If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
 # must first be located explicitly.
diff --git a/src/fontfile/catalogue.c b/src/fontfile/catalogue.c
index 8029b28..7e7e477 100644
--- a/src/fontfile/catalogue.c
+++ b/src/fontfile/catalogue.c
@@ -27,6 +27,8 @@
 #ifdef HAVE_CONFIG_H
 #include config.h
 #endif
+
+#ifdef HAVE_READLINK
 #include X11/fonts/fntfilst.h
 #include sys/types.h
 #include sys/stat.h
@@ -474,3 +476,5 @@ CatalogueRegisterLocalFpeFunctions (void)
 CatalogueListNextFontOrAlias,
 FontFileEmptyBitmapSource);
 }
+
+#endif /* HAVE_READLINK */
diff --git a/src/fontfile/register.c b/src/fontfile/register.c
index 8d7229e..4faeb8f 100644
--- a/src/fontfile/register.c
+++ b/src/fontfile/register.c
@@ -57,6 +57,8 @@ FontFileRegisterFpeFunctions(void)
 #endif
 
 FontFileRegisterLocalFpeFunctions ();
+#ifdef HAVE_READLINK
 CatalogueRegisterLocalFpeFunctions ();
+#endif
 }
 
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH proto/x11proto] Adjust windows.h wrapping to work with MinGW-w64 headers as well

2012-10-29 Thread Yaakov (Cygwin/X)
On Sun, 2012-10-21 at 08:24 +0100, Colin Harrison wrote:
 Jon's changes to proto/x11proto Xwindows.h are OK by me.

I have extended that patch somewhat; could you review this one:

http://lists.x.org/archives/xorg-devel/2012-October/034112.html


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH proto/x11proto] Adjust windows.h wrapping to work with MinGW-w64 headers as well

2012-10-29 Thread Yaakov (Cygwin/X)
On Tue, 2012-10-30 at 00:04 +, Colin Harrison wrote:
 Jon's patch to Xwindow.h is as far as I get OK at the moment...your extras
 cause me problems in a 32-bit build of the xserver.
 I'll get back, when I have time, with the reason...quick look...something to
 do with the INT64's used in wgl wrappers.

I see now, that's because INT64 is only prototyped on 64-bit platforms.
So let's leave that for now (as more work is required for Win64) and
just apply the same changes to Xwinsock.h:

http://lists.x.org/archives/xorg-devel/2012-October/034096.html


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 00/12] Warning fixes

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

In particular, please note the second patch goes a long way to quieting 
the build.

Yaakov Selkowitz (12):
  xfree86: os-support: fix old-style function definition warnings
  dix: fix redundant redeclaration warnings in dixfont
  dix: fix shadow warnings
  fb: fix shadow warnings
  mi: fix shadow warnings
  randr: export more provider property symbols
  render: fix shadow warnings
  xkb: fix shadow warnings
  Xext: fix unused variable warnings in xf86bigfont.c
  Xext: fix redundant redeclaration warnings
  Xi: fix fprint format warning
  Xext: fix shadow warnings

 Xext/panoramiX.c   |2 -
 Xext/shm.c |   10 +++---
 Xext/xace.c|   12 
 Xext/xf86bigfont.c |   12 ---
 Xext/xres.c|2 -
 Xext/xtest.c   |2 -
 Xi/exevents.c  |2 +-
 dix/dixfonts.c |9 +
 dix/events.c   |   24 +++---
 fb/fbblt.c |   12 
 fb/fbbltone.c  |8 ++--
 hw/xfree86/os-support/bus/nobus.c  |2 +-
 hw/xfree86/os-support/shared/agp_noop.c|2 +-
 hw/xfree86/os-support/shared/ioperm_noop.c |4 +-
 hw/xfree86/os-support/stub/stub_init.c |6 ++--
 hw/xfree86/sdksyms.sh  |1 +
 include/Makefile.am|2 +-
 include/dix.h  |   12 
 include/dixfont.h  |   39 +---
 include/dixfontstubs.h |   45 
 mi/mibitblt.c  |6 ++--
 mi/mispans.c   |4 --
 randr/randrstr.h   |8 +
 render/picturestr.h|8 ++--
 xkb/ddxList.c  |2 -
 xkb/xkb.c  |   27 
 xkb/xkbPrKeyEv.c   |4 +-
 xkb/xkbtext.c  |1 -
 xkb/xkmread.c  |2 -
 29 files changed, 134 insertions(+), 136 deletions(-)
 create mode 100644 include/dixfontstubs.h

-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 01/12] xfree86: os-support: fix old-style function definition warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 hw/xfree86/os-support/bus/nobus.c  |2 +-
 hw/xfree86/os-support/shared/agp_noop.c|2 +-
 hw/xfree86/os-support/shared/ioperm_noop.c |4 ++--
 hw/xfree86/os-support/stub/stub_init.c |6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/xfree86/os-support/bus/nobus.c 
b/hw/xfree86/os-support/bus/nobus.c
index dca58fe..dc36ecd 100644
--- a/hw/xfree86/os-support/bus/nobus.c
+++ b/hw/xfree86/os-support/bus/nobus.c
@@ -1,5 +1,5 @@
 static void
-__noop_to_appease_ar__()
+__noop_to_appease_ar__(void)
 {
 return;
 }
diff --git a/hw/xfree86/os-support/shared/agp_noop.c 
b/hw/xfree86/os-support/shared/agp_noop.c
index 9c6ed4b..da486c0 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -47,7 +47,7 @@ xf86GARTCloseScreen(int screenNum)
 }
 
 Bool
-xf86AgpGARTSupported()
+xf86AgpGARTSupported(void)
 {
 return FALSE;
 }
diff --git a/hw/xfree86/os-support/shared/ioperm_noop.c 
b/hw/xfree86/os-support/shared/ioperm_noop.c
index 30688c0..eeacee9 100644
--- a/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -36,13 +36,13 @@
 #include xf86_OSlib.h
 
 Bool
-xf86EnableIO()
+xf86EnableIO(void)
 {
 return TRUE;
 }
 
 void
-xf86DisableIO()
+xf86DisableIO(void)
 {
 return;
 }
diff --git a/hw/xfree86/os-support/stub/stub_init.c 
b/hw/xfree86/os-support/stub/stub_init.c
index 629675d..d3e0c3f 100644
--- a/hw/xfree86/os-support/stub/stub_init.c
+++ b/hw/xfree86/os-support/stub/stub_init.c
@@ -5,12 +5,12 @@
 #include xf86_OSlib.h
 
 void
-xf86OpenConsole()
+xf86OpenConsole(void)
 {
 }
 
 void
-xf86CloseConsole()
+xf86CloseConsole(void)
 {
 }
 
@@ -21,6 +21,6 @@ xf86ProcessArgument(int argc, char *argv[], int i)
 }
 
 void
-xf86UseMsg()
+xf86UseMsg(void)
 {
 }
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 02/12] dix: fix redundant redeclaration warnings in dixfont

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These functions are already declared in X11/fonts/fontproto.h.
Redeclaring them just for _X_EXPORT causes tons of warnings throughout
xserver, but they need to be declared somewhere to be picked up by
sdksyms.sh.  Doing so in a private header limits the warnings to
sdksyms.c; fixing those as well would require changes to fontsproto.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 dix/dixfonts.c |9 +
 hw/xfree86/sdksyms.sh  |1 +
 include/Makefile.am|2 +-
 include/dixfont.h  |   39 +--
 include/dixfontstubs.h |   45 +
 5 files changed, 57 insertions(+), 39 deletions(-)
 create mode 100644 include/dixfontstubs.h

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index ad21860..feb765d 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1823,12 +1823,14 @@ InitFonts(void)
 register_fpe_functions();
 }
 
+_X_EXPORT
 int
 GetDefaultPointSize(void)
 {
 return 120;
 }
 
+_X_EXPORT
 FontResolutionPtr
 GetClientResolutions(int *num)
 {
@@ -1861,6 +1863,7 @@ GetClientResolutions(int *num)
  * should be called (only once!) by each type of fpe when initialized
  */
 
+_X_EXPORT
 int
 RegisterFPEFunctions(NameCheckFunc name_func,
  InitFpeFunc init_func,
@@ -1932,24 +1935,28 @@ find_old_font(XID id)
 return (FontPtr) pFont;
 }
 
+_X_EXPORT
 Font
 GetNewFontClientID(void)
 {
 return FakeClientID(0);
 }
 
+_X_EXPORT
 int
 StoreFontClientFont(FontPtr pfont, Font id)
 {
 return AddResource(id, RT_NONE, (pointer) pfont);
 }
 
+_X_EXPORT
 void
 DeleteFontClientID(Font id)
 {
 FreeResource(id, RT_NONE);
 }
 
+_X_EXPORT
 int
 client_auth_generation(ClientPtr client)
 {
@@ -1959,6 +1966,7 @@ client_auth_generation(ClientPtr client)
 static int fs_handlers_installed = 0;
 static unsigned int last_server_gen;
 
+_X_EXPORT
 int
 init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
 {
@@ -1977,6 +1985,7 @@ init_fs_handlers(FontPathElementPtr fpe, 
BlockHandlerProcPtr block_handler)
 return Successful;
 }
 
+_X_EXPORT
 void
 remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler,
Bool all)
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index fa19893..48b48b5 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -259,6 +259,7 @@ cat  sdksyms.c  EOF
 #include dixevents.h
 #include dixfont.h
 #include dixfontstr.h
+#include dixfontstubs.h
 #include dixgrabs.h
 #include dixstruct.h
 #include exevents.h
diff --git a/include/Makefile.am b/include/Makefile.am
index 33116f2..5cdea1d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -69,6 +69,6 @@ AM_CFLAGS = $(DIX_CFLAGS)
 
 EXTRA_DIST =   \
dix-config-apple-verbatim.h \
-   eventconvert.h eventstr.h inpututils.h \
+   dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
protocol-versions.h \
xsha1.h
diff --git a/include/dixfont.h b/include/dixfont.h
index 3d09eb5..0a5f105 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -28,6 +28,7 @@ SOFTWARE.
 #include X11/fonts/font.h
 #include closure.h
 #include X11/fonts/fontstruct.h
+#include X11/fonts/fontproto.h
 
 #define NullDIXFontProp ((DIXFontPropPtr)0)
 
@@ -143,42 +144,4 @@ extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ 
);
 
 extern _X_EXPORT void register_fpe_functions(void);
 
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
-  BlockHandlerProcPtr block_handler);
-
-extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
-  InitFpeFunc init_func,
-  FreeFpeFunc free_func,
-  ResetFpeFunc reset_func,
-  OpenFontFunc open_func,
-  CloseFontFunc close_func,
-  ListFontsFunc list_func,
-  StartLfwiFunc start_lfwi_func,
-  NextLfwiFunc next_lfwi_func,
-  WakeupFpeFunc wakeup_func,
-  ClientDiedFunc client_died,
-  LoadGlyphsFunc load_glyphs,
-  StartLaFunc start_list_alias_func,
-  NextLaFunc next_list_alias_func,
-  SetPathFunc 

[PATCH 03/12] dix: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

dispatch.c: In function 'ProcCopyArea':
dispatch.c:1608:5: warning: declaration of 'rc' shadows a previous local
dispatch.c:1604:9: warning: shadowed declaration is here
dispatch.c: In function 'ProcCopyPlane':
dispatch.c:1647:5: warning: declaration of 'rc' shadows a previous local
dispatch.c:1643:9: warning: shadowed declaration is here
events.c: In function 'GetClientsForDelivery':
events.c:2030:68: warning: declaration of 'clients' shadows a global declaration
../include/dix.h:124:28: warning: shadowed declaration is here
events.c: In function 'DeliverEventToWindowMask':
events.c:2113:19: warning: declaration of 'clients' shadows a global declaration
../include/dix.h:124:28: warning: shadowed declaration is here
events.c: In function 'EventSuppressForWindow':
events.c:4420:12: warning: declaration of 'free' shadows a global declaration

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 dix/events.c  |   24 
 include/dix.h |   12 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index ddb5b34..e790bfc 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2027,19 +2027,19 @@ DeliverToWindowOwner(DeviceIntPtr dev, WindowPtr win,
  */
 static Bool
 GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
-  xEvent *events, Mask filter, InputClients ** clients)
+  xEvent *events, Mask filter, InputClients ** iclients)
 {
 int rc = 0;
 
 if (core_get_type(events) != 0)
-*clients = (InputClients *) wOtherClients(win);
+*iclients = (InputClients *) wOtherClients(win);
 else if (xi2_get_type(events) != 0) {
 OtherInputMasks *inputMasks = wOtherInputMasks(win);
 
 /* Has any client selected for the event? */
 if (!WindowXI2MaskIsset(dev, win, events))
 goto out;
-*clients = inputMasks-inputClients;
+*iclients = inputMasks-inputClients;
 }
 else {
 OtherInputMasks *inputMasks = wOtherInputMasks(win);
@@ -2048,7 +2048,7 @@ GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
 if (!inputMasks || !(inputMasks-inputEvents[dev-id]  filter))
 goto out;
 
-*clients = inputMasks-inputClients;
+*iclients = inputMasks-inputClients;
 }
 
 rc = 1;
@@ -2110,12 +2110,12 @@ DeliverEventToWindowMask(DeviceIntPtr dev, WindowPtr 
win, xEvent *events,
  int count, Mask filter, GrabPtr grab,
  ClientPtr *client_return, Mask *mask_return)
 {
-InputClients *clients;
+InputClients *iclients;
 
-if (!GetClientsForDelivery(dev, win, events, filter, clients))
+if (!GetClientsForDelivery(dev, win, events, filter, iclients))
 return EVENT_SKIP;
 
-return DeliverEventToInputClients(dev, clients, win, events, count, filter,
+return DeliverEventToInputClients(dev, iclients, win, events, count, 
filter,
   grab, client_return, mask_return);
 
 }
@@ -4417,7 +4417,7 @@ int
 EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
Mask mask, Bool *checkOptional)
 {
-int i, free;
+int i, freed;
 
 if (mask  ~PropagateMask) {
 client-errorValue = mask;
@@ -4428,14 +4428,14 @@ EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
 if (!mask)
 i = 0;
 else {
-for (i = DNPMCOUNT, free = 0; --i  0;) {
+for (i = DNPMCOUNT, freed = 0; --i  0;) {
 if (!DontPropagateRefCnts[i])
-free = i;
+freed = i;
 else if (mask == DontPropagateMasks[i])
 break;
 }
-if (!i  free) {
-i = free;
+if (!i  freed) {
+i = freed;
 DontPropagateMasks[i] = mask;
 }
 }
diff --git a/include/dix.h b/include/dix.h
index 74123b5..171e56e 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -88,12 +88,12 @@ SOFTWARE.
 
 #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
 {\
-   int rc = dixLookupDrawable((pDraw), drawID, client, M_ANY, mode);\
-   if (rc != Success)\
-   return rc;\
-   rc = dixLookupGC((pGC), stuff-gc, client, DixUseAccess);\
-   if (rc != Success)\
-   return rc;\
+   int tmprc = dixLookupDrawable((pDraw), drawID, client, M_ANY, mode);\
+   if (tmprc != Success)\
+   return tmprc;\
+   tmprc = dixLookupGC((pGC), stuff-gc, client, DixUseAccess);\
+   if (tmprc != Success)\
+   return tmprc;\
if ((pGC-depth != pDraw-depth) || (pGC-pScreen != pDraw-pScreen))\
return BadMatch;\
 }\
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 04/12] fb: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

fbblt.c: In function 'fbBlt':
fbblt.c:76:16: warning: declaration of 'src' shadows a previous local
fbblt.c:52:13: warning: shadowed declaration is here
fbblt.c:77:16: warning: declaration of 'dst' shadows a previous local
fbblt.c:52:19: warning: shadowed declaration is here
fbbltone.c: In function 'fbBltPlane':
fbbltone.c:742:13: warning: declaration of 'w' shadows a previous local
fbbltone.c:725:9: warning: shadowed declaration is here

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 fb/fbblt.c|   12 ++--
 fb/fbbltone.c |8 
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fb/fbblt.c b/fb/fbblt.c
index 17bd698..72a05f6 100644
--- a/fb/fbblt.c
+++ b/fb/fbblt.c
@@ -73,21 +73,21 @@ fbBlt(FbBits * srcLine,
 if (alu == GXcopy  pm == FB_ALLONES  !careful 
 !(srcX  7)  !(dstX  7)  !(width  7)) {
 int i;
-CARD8 *src = (CARD8 *) srcLine;
-CARD8 *dst = (CARD8 *) dstLine;
+CARD8 *tmpsrc = (CARD8 *) srcLine;
+CARD8 *tmpdst = (CARD8 *) dstLine;
 
 srcStride *= sizeof(FbBits);
 dstStride *= sizeof(FbBits);
 width = 3;
-src += (srcX  3);
-dst += (dstX  3);
+tmpsrc += (srcX  3);
+tmpdst += (dstX  3);
 
 if (!upsidedown)
 for (i = 0; i  height; i++)
-MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, 
width);
+MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, 
width);
 else
 for (i = height - 1; i = 0; i--)
-MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, 
width);
+MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, 
width);
 
 return;
 }
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index eb7cf94..bfcb5a2 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -739,12 +739,12 @@ fbBltPlane(FbBits * src,
 
 pm = fbReplicatePixel(planeMask, srcBpp);
 if (srcBpp == 24) {
-int w = 24;
+int tmpw = 24;
 
 rot0 = FbFirst24Rot(srcX);
-if (srcX + w  FB_UNIT)
-w = FB_UNIT - srcX;
-srcMaskFirst = FbRot24(pm, rot0)  FbBitsMask(srcX, w);
+if (srcX + tmpw  FB_UNIT)
+tmpw = FB_UNIT - srcX;
+srcMaskFirst = FbRot24(pm, rot0)  FbBitsMask(srcX, tmpw);
 }
 else {
 rot0 = 0;
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 05/12] mi: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

mibitblt.c: In function 'miGetImage':
mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local
mibitblt.c:609:17: warning: shadowed declaration is here
mispans.c: In function 'miFillUniqueSpanGroup':
mispans.c:456:33: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here
mispans.c:488:17: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 mi/mibitblt.c |6 +++---
 mi/mispans.c  |4 
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index b9873c1..b0d14ae 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -614,7 +614,7 @@ miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h,
 if (format == ZPixmap) {
 if 1LL  depth) - 1)  planeMask) != (1LL  depth) - 1) {
 ChangeGCVal gcv;
-xPoint pt;
+xPoint xpt;
 
 pGC = GetScratchGC(depth, pDraw-pScreen);
 if (!pGC)
@@ -629,9 +629,9 @@ miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h,
  * Clear the pixmap before doing anything else
  */
 ValidateGC((DrawablePtr) pPixmap, pGC);
-pt.x = pt.y = 0;
+xpt.x = xpt.y = 0;
 width = w;
-(*pGC-ops-FillSpans) ((DrawablePtr) pPixmap, pGC, 1, pt, width,
+(*pGC-ops-FillSpans) ((DrawablePtr) pPixmap, pGC, 1, xpt, 
width,
 TRUE);
 
 /* alu is already GXCopy */
diff --git a/mi/mispans.c b/mi/mispans.c
index 0f89880..11c8a43 100644
--- a/mi/mispans.c
+++ b/mi/mispans.c
@@ -453,8 +453,6 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, 
SpanGroup * spanGroup)
 (int *) realloc(newspans-widths,
 ysizes[index] * sizeof(int));
 if (!newpoints || !newwidths) {
-int i;
-
 for (i = 0; i  ylength; i++) {
 free(yspans[i].points);
 free(yspans[i].widths);
@@ -485,8 +483,6 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, 
SpanGroup * spanGroup)
 points = malloc(count * sizeof(DDXPointRec));
 widths = malloc(count * sizeof(int));
 if (!points || !widths) {
-int i;
-
 for (i = 0; i  ylength; i++) {
 free(yspans[i].points);
 free(yspans[i].widths);
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 06/12] randr: export more provider property symbols

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These were added as part of commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5
but never declared or exported.  Fixes warnings:

rrproviderproperty.c:255:1: warning: no previous prototype for 
'RRPostProviderPendingProperties'
rrproviderproperty.c:327:1: warning: no previous prototype for 
'RRConfigureProviderProperty'

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
Reviewed-by: Dave Airlie airl...@redhat.com
---
 randr/randrstr.h |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/randr/randrstr.h b/randr/randrstr.h
index 212b0a9..a16302f 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -933,6 +933,14 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom 
property, Atom type,
pointer value, Bool sendevent, Bool pending);
 
 extern _X_EXPORT int
+ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
+ Bool pending, Bool range, Bool immutable,
+ int num_values, INT32 *values);
+
+extern _X_EXPORT Bool
+ RRPostProviderPendingProperties(RRProviderPtr provider);
+
+extern _X_EXPORT int
  ProcRRGetProviderProperty(ClientPtr client);
 
 extern _X_EXPORT int
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 07/12] render: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 render/picturestr.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/render/picturestr.h b/render/picturestr.h
index dc00f41..5644f28 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -363,10 +363,10 @@ extern _X_EXPORT RESTYPE GlyphSetType;
 #define SetPictureWindow(w,p) dixSetPrivate((w)-devPrivates, 
PictureWindowPrivateKey, p)
 
 #define VERIFY_PICTURE(pPicture, pid, client, mode) {\
-int rc = dixLookupResourceByType((pointer)(pPicture), pid,\
-PictureType, client, mode);\
-if (rc != Success)\
-   return rc;\
+int tmprc = dixLookupResourceByType((pointer)(pPicture), pid,\
+   PictureType, client, mode);\
+if (tmprc != Success)\
+   return tmprc;\
 }
 
 #define VERIFY_ALPHA(pPicture, pid, client, mode) {\
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 08/12] xkb: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 xkb/ddxList.c|2 --
 xkb/xkb.c|   27 +--
 xkb/xkbPrKeyEv.c |4 ++--
 xkb/xkbtext.c|1 -
 xkb/xkmread.c|2 --
 5 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index 79f4637..729c5ae 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -131,8 +131,6 @@ XkbDDXListComponent(DeviceIntPtr dev,
 file = list-pattern[what];
 map = strrchr(file, '(');
 if (map != NULL) {
-char *tmp;
-
 map++;
 tmp = strrchr(map, ')');
 if ((tmp == NULL) || (tmp[1] != '\0')) {
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 4440a98..efb178c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -57,10 +57,10 @@ static RESTYPE RT_XKBCLIENT;
 
 #defineCHK_DEVICE(dev, id, client, access_mode, lf) {\
 int why;\
-int rc = lf((dev), id, client, access_mode, why);\
-if (rc != Success) {\
+int tmprc = lf((dev), id, client, access_mode, why);\
+if (tmprc != Success) {\
client-errorValue = _XkbErrCode2(why, id);\
-   return rc;\
+   return tmprc;\
 }\
 }
 
@@ -1026,22 +1026,22 @@ XkbWriteKeyTypes(XkbDescPtr xkb,
 
 buf = (char *) wire[1];
 if (wire-nMapEntries  0) {
-xkbKTMapEntryWireDesc *wire;
+xkbKTMapEntryWireDesc *ewire;
 XkbKTMapEntryPtr entry;
 
-wire = (xkbKTMapEntryWireDesc *) buf;
+ewire = (xkbKTMapEntryWireDesc *) buf;
 entry = type-map;
-for (n = 0; n  type-map_count; n++, wire++, entry++) {
-wire-active = entry-active;
-wire-mask = entry-mods.mask;
-wire-level = entry-level;
-wire-realMods = entry-mods.real_mods;
-wire-virtualMods = entry-mods.vmods;
+for (n = 0; n  type-map_count; n++, ewire++, entry++) {
+ewire-active = entry-active;
+ewire-mask = entry-mods.mask;
+ewire-level = entry-level;
+ewire-realMods = entry-mods.real_mods;
+ewire-virtualMods = entry-mods.vmods;
 if (client-swapped) {
-swaps(wire-virtualMods);
+swaps(ewire-virtualMods);
 }
 }
-buf = (char *) wire;
+buf = (char *) ewire;
 if (type-preserve != NULL) {
 xkbModsWireDesc *pwire;
 XkbModsPtr preserve;
@@ -2903,7 +2903,6 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
 }
 
 if (req-groups != 0) {
-unsigned i, bit;
 xkbModsWireDesc *wire = (xkbModsWireDesc *) data;
 
 for (i = 0, bit = 1; i  XkbNumKbdGroups; i++, bit = 1) {
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index 3241183..b24fd6c 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -104,13 +104,13 @@ XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr 
keybd)
 return;
 }
 if (rg-currentDown != 0) {
-int key = event-detail.key;
+int tmpkey = event-detail.key;
 
 event-type = ET_KeyRelease;
 event-detail.key = rg-currentDown;
 XkbHandleActions(keybd, keybd, event);
 event-type = ET_KeyPress;
-event-detail.key = key;
+event-detail.key = tmpkey;
 }
 rg-currentDown = key;
 }
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index f66a08f..fdf1d17 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -1266,7 +1266,6 @@ XkbBehaviorText(XkbDescPtr xkb, XkbBehavior * behavior, 
unsigned format)
 }
 else if (type == XkbKB_RadioGroup) {
 int g;
-char *tmp;
 
 g = ((behavior-data)  (~XkbKB_RGAllowNone)) + 1;
 if (XkbKB_RGAllowNone  behavior-data) {
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 45da965..258bb91 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -772,8 +772,6 @@ ReadXkmSymbols(FILE * file, XkbDescPtr xkb)
 memset((char *) typeName, 0, XkbNumKbdGroups * sizeof(Atom));
 memset((char *) type, 0, XkbNumKbdGroups * sizeof(XkbKeyTypePtr));
 if (wireMap.flags  XkmKeyHasTypes) {
-register int g;
-
 for (g = 0; g  XkbNumKbdGroups; g++) {
 if ((wireMap.flags  (1  g)) 
 ((tmp = XkmGetCountedString(file, buf, 100))  0)) {
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 09/12] Xext: fix unused variable warnings in xf86bigfont.c

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These were rendered unused by commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
Reviewed-by: Peter Hutterer peter.hutte...@who-t.net
---
 Xext/xf86bigfont.c |   12 
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index faf81f7..46b3242 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -296,8 +296,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
 #endif
 };
 if (client-swapped) {
-char tmp;
-
 swaps(reply.sequenceNumber);
 swapl(reply.length);
 swaps(reply.majorVersion);
@@ -313,8 +311,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
 static void
 swapCharInfo(xCharInfo * pCI)
 {
-char tmp;
-
 swaps(pCI-leftSideBearing);
 swaps(pCI-rightSideBearing);
 swaps(pCI-characterWidth);
@@ -585,8 +581,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 reply-shmid = shmid;
 reply-shmsegoffset = 0;
 if (client-swapped) {
-char tmp;
-
 swaps(reply-sequenceNumber);
 swapl(reply-length);
 swapCharInfo(reply-minBounds);
@@ -613,8 +607,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 prFP-name = pFP-name;
 prFP-value = pFP-value;
 if (client-swapped) {
-char tmp;
-
 swapl(prFP-name);
 swapl(prFP-value);
 }
@@ -636,8 +628,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 for (j = 0; j  nCharInfos; j++, ps++) {
 *ps = pIndex2UniqIndex[j];
 if (client-swapped) {
-char tmp;
-
 swaps(ps);
 }
 }
@@ -673,7 +663,6 @@ static int
 SProcXF86BigfontQueryVersion(ClientPtr client)
 {
 REQUEST(xXF86BigfontQueryVersionReq);
-char tmp;
 
 swaps(stuff-length);
 return ProcXF86BigfontQueryVersion(client);
@@ -683,7 +672,6 @@ static int
 SProcXF86BigfontQueryFont(ClientPtr client)
 {
 REQUEST(xXF86BigfontQueryFontReq);
-char tmp;
 
 swaps(stuff-length);
 REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 10/12] Xext: fix redundant redeclaration warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

panoramiX.c:595:13: warning: redundant redeclaration of 'CreateConnectionBlock'
../include/dix.h:167:23: note: previous declaration of 'CreateConnectionBlock' 
was here
xres.c:193:13: warning: redundant redeclaration of 'ResExtensionInit'
../include/extinit.h:109:13: note: previous declaration of 'ResExtensionInit'
xtest.c:60:12: warning: redundant redeclaration of 'DeviceValuator'
../Xi/exglobals.h:61:12: note: previous declaration of 'DeviceValuator' was here

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xext/panoramiX.c |2 --
 Xext/xres.c  |2 --
 Xext/xtest.c |2 --
 3 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 1c7197d..be475f7 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -592,8 +592,6 @@ PanoramiXExtensionInit(void)
 
 }
 
-extern Bool CreateConnectionBlock(void);
-
 Bool
 PanoramiXCreateConnectionBlock(void)
 {
diff --git a/Xext/xres.c b/Xext/xres.c
index 7d21ad7..445abca 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -190,8 +190,6 @@ DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx 
*ctx)
 ht_destroy(ctx-visitedResources);
 }
 
-extern void ResExtensionInit(void);
-
 static int
 ProcXResQueryVersion(ClientPtr client)
 {
diff --git a/Xext/xtest.c b/Xext/xtest.c
index c593372..2abdc7f 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -57,8 +57,6 @@
 
 #include extinit.h
 
-extern int DeviceValuator;
-
 /* XTest events are sent during request processing and may be interruped by
  * a SIGIO. We need a separate event list to avoid events overwriting each
  * other's memory */
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 11/12] Xi: fix fprint format warning

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

exevents.c: In function 'ProcessTouchEvent':
exevents.c:1601:20: warning: too many arguments for format

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xi/exevents.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 6ed4991..396bf90 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1598,7 +1598,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
 if (!ti) {
 DebugF([Xi] %s: Failed to create new dix record for explicitly 
grabbed touchpoint %d\n,
-   dev-name, type, touchid);
+   dev-name, touchid);
 return;
 }
 
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 12/12] Xext: fix shadow warnings

2012-10-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xext/shm.c  |   10 +-
 Xext/xace.c |   12 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Xext/shm.c b/Xext/shm.c
index 3fa04b9..5596090 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -135,11 +135,11 @@ static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL };
 
 #define VERIFY_SHMSEG(shmseg,shmdesc,client) \
 { \
-int rc; \
-rc = dixLookupResourceByType((pointer *)(shmdesc), shmseg, ShmSegType, \
- client, DixReadAccess); \
-if (rc != Success) \
-   return rc; \
+int tmprc; \
+tmprc = dixLookupResourceByType((pointer *)(shmdesc), shmseg, ShmSegType, 
\
+client, DixReadAccess); \
+if (tmprc != Success) \
+   return tmprc; \
 }
 
 #define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \
diff --git a/Xext/xace.c b/Xext/xace.c
index b2e7dda..026d3c5 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -47,18 +47,18 @@ XaceHookDispatch(ClientPtr client, int major)
 
 if (major  128) {
 /* Call the core dispatch hook */
-XaceCoreDispatchRec rec = { client, Success /* default allow */  };
-CallCallbacks(XaceHooks[XACE_CORE_DISPATCH], rec);
-return rec.status;
+XaceCoreDispatchRec drec = { client, Success /* default allow */  };
+CallCallbacks(XaceHooks[XACE_CORE_DISPATCH], drec);
+return drec.status;
 }
 else {
 /* Call the extension dispatch hook */
 ExtensionEntry *ext = GetExtensionEntry(major);
-XaceExtAccessRec rec = { client, ext, DixUseAccess, Success };
+XaceExtAccessRec erec = { client, ext, DixUseAccess, Success };
 if (ext)
-CallCallbacks(XaceHooks[XACE_EXT_DISPATCH], rec);
+CallCallbacks(XaceHooks[XACE_EXT_DISPATCH], erec);
 /* On error, pretend extension doesn't exist */
-return (rec.status == Success) ? Success : BadRequest;
+return (erec.status == Success) ? Success : BadRequest;
 }
 }
 
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH lib/libXpm] Define NO_ZPIPE when building for MinGW

2012-10-26 Thread Yaakov (Cygwin/X)
On Mon, 2012-10-22 at 16:07 +0100, Jon TURNEY wrote:
 Define NO_ZPIPE when building for MinGW, decompressing via a pipe isn't 
 possible

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 3/4] hw/xwin: fmemopen is available on cygwin but not MinGW

2012-10-26 Thread Yaakov (Cygwin/X)
On Tue, 2012-10-23 at 16:11 +0100, Jon TURNEY wrote:
 This is a follow-up to commit 0659437f5ec0e3f646373394f5f9c5461e2170f3.

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] macros: clarify documentation

2012-10-25 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 xorg-server.m4 |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xorg-server.m4 b/xorg-server.m4
index bdecf62..18255b9 100644
--- a/xorg-server.m4
+++ b/xorg-server.m4
@@ -23,10 +23,10 @@ dnl other dealings in this Software without prior written 
authorization
 dnl from the copyright holders.
 dnl 
 
-# XORG_DRIVER_CHECK_EXT()
+# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
 # --
-# Checks for the $1 define in xorg-server.h (from the sdk).  If it
-# is defined, then add $1 to $REQUIRED_MODULES.
+# Checks for the MACRO define in xorg-server.h (from the sdk).  If it
+# is defined, then add the given PROTO to $REQUIRED_MODULES.
 
 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH libXvMC] Fix linking with -Wl,--no-undefined on Linux

2012-10-24 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

libXvMCW uses dlopen and friends, therefore it must be linked against
libdl on systems where it exists as a separate library.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac|6 ++
 wrapper/Makefile.am |2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index ae7d08b..6c34fc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,12 @@ PKG_CHECK_MODULES(XVMC, x11 xext xv xextproto videoproto)
 # Checks for library functions.
 AC_CHECK_FUNCS([shmat])
 
+# Check to see if dlopen is in default libraries (like Solaris, which
+# has it in libc), or if libdl is needed to get it.
+AC_CHECK_FUNC([dlopen], [],
+   AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS=-ldl))
+AC_SUBST(DLOPEN_LIBS)
+
 # Allow checking code with lint, sparse, etc.
 XORG_WITH_LINT
 LINT_FLAGS=${LINT_FLAGS} ${XVMC_CFLAGS}
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index b3a1c21..fbe8cf7 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
 AM_CFLAGS = $(CWARNFLAGS) $(XVMC_CFLAGS)
 
 libXvMCW_la_SOURCES = XvMCWrapper.c
-libXvMCW_la_LIBADD = $(XVMC_LIBS)
+libXvMCW_la_LIBADD = $(XVMC_LIBS) $(DLOPEN_LIBS)
 libXvMCW_la_LDFLAGS = -version-number 1:0:0 -no-undefined
 
 if LINT
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH video-dummy] Default DGA to auto based on presence of xf86dgaproto

2012-10-24 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

If xf86dgaproto is absent, then we can safely assume that DGA isn't
supported in the server either.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index c74f3a0..5ff4b64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ AC_PROG_LIBTOOL
 AH_TOP([#include xorg-server.h])
 
 # Define a configure option for an alternate module directory
-AC_ARG_ENABLE(dga,   AS_HELP_STRING([--disable-dga], [Build DGA 
extension (default: yes)]), [DGA=$enableval], [DGA=yes])
+AC_ARG_ENABLE(dga,   AS_HELP_STRING([--disable-dga], [Build DGA 
extension (default: auto)]), [DGA=$enableval], [DGA=auto])
 AC_ARG_WITH(xorg-module-dir, [  --with-xorg-module-dir=DIR ],
  [ moduledir=$withval ],
  [ moduledir=$libdir/xorg/modules ])
@@ -59,6 +59,9 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
 XORG_DRIVER_CHECK_EXT(XV, videoproto)
 
+if test x$DGA = xauto; then
+   PKG_CHECK_EXISTS(xf86dgaproto, [DGA=yes], [DGA=no])
+fi
 if test x$DGA = xyes; then
XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
AC_DEFINE(USE_DGA, 1, [Support DGA extension])
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH lib/libXaw] Include winsock header on WIN32 to provide fd_set etc.

2012-10-23 Thread Yaakov (Cygwin/X)
On Tue, 2012-10-23 at 15:33 +0100, Jon TURNEY wrote:
 Include winsock header on WIN32 to provide fd_set etc.
 
 v2: also link with ws2_32 on MinGW
 
 Signed-off-by: Ryan Pavlik rpav...@iastate.edu
 Reviewed-by: Jon TURNEY jon.tur...@dronecode.org.uk

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] Adjust wrapping to work with MinGW-w64 headers as well

2012-10-22 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Adjust windows.h wrapping to work with MinGW-w64 as well MinGW.org headers,
which define BOOL in a different way.
Add some more comments on what we doing here.

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
v2: Added similar wrapping for Xwinsock.h, needed for *-w64-mingw32.
(Cygwin uses only Xwindows.h, as it has a POSIX socket API.)

 Xwindows.h |   39 ---
 Xwinsock.h |   14 +-
 2 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/Xwindows.h b/Xwindows.h
index 6318155..e6be6ee 100644
--- a/Xwindows.h
+++ b/Xwindows.h
@@ -29,28 +29,39 @@ The Open Group.
 /*
  * This header file has the sole purpose of allowing the inclusion of
  * windows.h without getting any name conflicts with X headers code, by
- * renaming the conflicting definitions from windows.h
- *
- * Some (non-Microsoft) versions of the Windows API headers actually avoid
+ * renaming or disabling the conflicting definitions from windows.h
+ */
+
+/*
+ * Mingw.org versions of the Windows API headers actually avoid
  * making the conflicting definitions if XFree86Server is defined, so we
  * need to remember if that was defined and undefine it during including
  * windows.h (so the conflicting definitions get wrapped correctly), and
- * then redefine it afterwards...
- *
- * There doesn't seem to be a good way to wrap the min/max macros from
- * windows.h, so we simply avoid defining them completely, allowing any
- * pre-existing definition to stand.
- *
+ * then redefine it afterwards. (This was never the correct thing to
+ * do as it's no help at all to X11 clients which also need to use the
+ * Win32 API)
  */
-
 #undef _XFree86Server
 #ifdef XFree86Server
 # define _XFree86Server
 # undef XFree86Server
 #endif
 
+/*
+ * There doesn't seem to be a good way to wrap the min/max macros from
+ * windows.h, so we simply avoid defining them completely, allowing any
+ * pre-existing definition to stand.
+ *
+ */
 #define NOMINMAX
-#define BOOL wBOOL
+
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
 #define INT32 wINT32
 #undef Status
 #define Status wStatus
@@ -68,6 +79,12 @@ The Open Group.
 #undef FreeResource
 #undef CreateWindowA
 
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
 #ifdef RESOURCE_H
 # undef RT_FONT
 # undef RT_CURSOR
diff --git a/Xwinsock.h b/Xwinsock.h
index e6ca7b5..a81dd7a 100644
--- a/Xwinsock.h
+++ b/Xwinsock.h
@@ -39,7 +39,13 @@ The Open Group.
 # undef XFree86Server
 #endif
 
-#define BOOL wBOOL
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
 #define INT32 wINT32
 #undef Status
 #define Status wStatus
@@ -58,6 +64,12 @@ The Open Group.
 #undef RT_FONT
 #undef RT_CURSOR
 
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
 #ifdef _XFree86Server
 # define XFree86Server
 # undef _XFree86Server
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Adjust wrapping to work with MinGW-w64 headers as well

2012-10-22 Thread Yaakov (Cygwin/X)
On Mon, 2012-10-22 at 02:57 -0500, Yaakov (Cygwin/X) wrote:
 Adjust windows.h wrapping to work with MinGW-w64 as well MinGW.org headers,
 which define BOOL in a different way.
 Add some more comments on what we doing here.

Scratch this; even more wrapping is needed for x86_64-w64-mingw32.  I'll
try to post a new patch later today.


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH lib/libXfont] Provide a dummy readlink on WIN32

2012-10-22 Thread Yaakov (Cygwin/X)
On Mon, 2012-10-22 at 16:07 +0100, Jon TURNEY wrote:
 Provide a dummy readlink, which just returns the supplied path name, on WIN32

This compiles, but does this really make sense?  Catalogues are managed
with symlinks, which exist on Windows only in later versions and even
then aren't POSIXy.  I wonder if catalogues are even used by Win32 X
servers.  Colin?


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xproto] Adjust wrapping to work with MinGW-w64 headers

2012-10-22 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Adjust windows.h wrapping to work with MinGW-w64 as well MinGW.org headers,
which define BOOL in a different way.
Add some more comments on what we doing here.
v2: Make similar changes to Xwinsock.h, used for MinGW but not Cygwin.
v3: Also add wrappers for conflicting 64-bit types.

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
X11 on Win64 has other issues (as discussed today on IRC), but I think 
this takes care of the conflicting types.

 Xwindows.h |   43 ---
 Xwinsock.h |   18 +-
 2 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/Xwindows.h b/Xwindows.h
index 6318155..888df2d 100644
--- a/Xwindows.h
+++ b/Xwindows.h
@@ -29,29 +29,42 @@ The Open Group.
 /*
  * This header file has the sole purpose of allowing the inclusion of
  * windows.h without getting any name conflicts with X headers code, by
- * renaming the conflicting definitions from windows.h
- *
- * Some (non-Microsoft) versions of the Windows API headers actually avoid
+ * renaming or disabling the conflicting definitions from windows.h
+ */
+
+/*
+ * Mingw.org versions of the Windows API headers actually avoid
  * making the conflicting definitions if XFree86Server is defined, so we
  * need to remember if that was defined and undefine it during including
  * windows.h (so the conflicting definitions get wrapped correctly), and
- * then redefine it afterwards...
- *
- * There doesn't seem to be a good way to wrap the min/max macros from
- * windows.h, so we simply avoid defining them completely, allowing any
- * pre-existing definition to stand.
- *
+ * then redefine it afterwards. (This was never the correct thing to
+ * do as it's no help at all to X11 clients which also need to use the
+ * Win32 API)
  */
-
 #undef _XFree86Server
 #ifdef XFree86Server
 # define _XFree86Server
 # undef XFree86Server
 #endif
 
+/*
+ * There doesn't seem to be a good way to wrap the min/max macros from
+ * windows.h, so we simply avoid defining them completely, allowing any
+ * pre-existing definition to stand.
+ *
+ */
 #define NOMINMAX
-#define BOOL wBOOL
+
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
 #define INT32 wINT32
+#define INT64 wINT64
+#define LONG64 wLONG64
 #undef Status
 #define Status wStatus
 #define ATOM wATOM
@@ -64,10 +77,18 @@ The Open Group.
 #undef BYTE
 #undef BOOL
 #undef INT32
+#undef INT64
+#undef LONG64
 #undef ATOM
 #undef FreeResource
 #undef CreateWindowA
 
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
 #ifdef RESOURCE_H
 # undef RT_FONT
 # undef RT_CURSOR
diff --git a/Xwinsock.h b/Xwinsock.h
index e6ca7b5..e846785 100644
--- a/Xwinsock.h
+++ b/Xwinsock.h
@@ -39,8 +39,16 @@ The Open Group.
 # undef XFree86Server
 #endif
 
-#define BOOL wBOOL
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
 #define INT32 wINT32
+#define INT64 wINT64
+#define LONG64 wLONG64
 #undef Status
 #define Status wStatus
 #define ATOM wATOM
@@ -52,12 +60,20 @@ The Open Group.
 #undef BYTE
 #undef BOOL
 #undef INT32
+#undef INT64
+#undef LONG64
 #undef ATOM
 #undef FreeResource
 #undef CreateWindowA
 #undef RT_FONT
 #undef RT_CURSOR
 
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
 #ifdef _XFree86Server
 # define XFree86Server
 # undef _XFree86Server
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] randr: export more provider property symbols

2012-10-16 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These were added as part of commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5
but never declared or exported.  Fixes warnings:

rrproviderproperty.c:255:1: warning: no previous prototype for 
'RRPostProviderPendingProperties'
rrproviderproperty.c:327:1: warning: no previous prototype for 
'RRConfigureProviderProperty'

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 randr/randrstr.h |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/randr/randrstr.h b/randr/randrstr.h
index 212b0a9..a16302f 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -933,6 +933,14 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom 
property, Atom type,
pointer value, Bool sendevent, Bool pending);
 
 extern _X_EXPORT int
+ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
+ Bool pending, Bool range, Bool immutable,
+ int num_values, INT32 *values);
+
+extern _X_EXPORT Bool
+ RRPostProviderPendingProperties(RRProviderPtr provider);
+
+extern _X_EXPORT int
  ProcRRGetProviderProperty(ClientPtr client);
 
 extern _X_EXPORT int
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] dix: fix redundant redeclaration warnings in dixfont

2012-10-16 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These functions are already declared in X11/fonts/fontproto.h.
Redeclaring them just for _X_EXPORT causes tons of warnings throughout
xserver, but they need to be declared somewhere to be picked up by
sdksyms.sh.  Doing so in a private header limits the warnings to
sdksyms.c; fixing those as well would require changes to fontsproto.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/sdksyms.sh  |1 +
 include/Makefile.am|2 +-
 include/dixfont.h  |   39 +--
 include/dixfontstubs.h |   45 +
 4 files changed, 48 insertions(+), 39 deletions(-)
 create mode 100644 include/dixfontstubs.h

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index fa19893..48b48b5 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -259,6 +259,7 @@ cat  sdksyms.c  EOF
 #include dixevents.h
 #include dixfont.h
 #include dixfontstr.h
+#include dixfontstubs.h
 #include dixgrabs.h
 #include dixstruct.h
 #include exevents.h
diff --git a/include/Makefile.am b/include/Makefile.am
index 33116f2..5cdea1d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -69,6 +69,6 @@ AM_CFLAGS = $(DIX_CFLAGS)
 
 EXTRA_DIST =   \
dix-config-apple-verbatim.h \
-   eventconvert.h eventstr.h inpututils.h \
+   dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
protocol-versions.h \
xsha1.h
diff --git a/include/dixfont.h b/include/dixfont.h
index 3d09eb5..0a5f105 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -28,6 +28,7 @@ SOFTWARE.
 #include X11/fonts/font.h
 #include closure.h
 #include X11/fonts/fontstruct.h
+#include X11/fonts/fontproto.h
 
 #define NullDIXFontProp ((DIXFontPropPtr)0)
 
@@ -143,42 +144,4 @@ extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ 
);
 
 extern _X_EXPORT void register_fpe_functions(void);
 
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
-  BlockHandlerProcPtr block_handler);
-
-extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
-  InitFpeFunc init_func,
-  FreeFpeFunc free_func,
-  ResetFpeFunc reset_func,
-  OpenFontFunc open_func,
-  CloseFontFunc close_func,
-  ListFontsFunc list_func,
-  StartLfwiFunc start_lfwi_func,
-  NextLfwiFunc next_lfwi_func,
-  WakeupFpeFunc wakeup_func,
-  ClientDiedFunc client_died,
-  LoadGlyphsFunc load_glyphs,
-  StartLaFunc start_list_alias_func,
-  NextLaFunc next_list_alias_func,
-  SetPathFunc set_path_func);
-
-extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr blockHandler,
- Bool all);
-
-extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
-
 #endif  /* DIXFONT_H */
diff --git a/include/dixfontstubs.h b/include/dixfontstubs.h
new file mode 100644
index 000..0454ffa
--- /dev/null
+++ b/include/dixfontstubs.h
@@ -0,0 +1,45 @@
+#ifndef DIXFONTSTUBS_H
+#define DIXFONTSTUBS_H 1
+
+/*
+ * libXfont stubs replacements
+ * This header exists solely for the purpose of sdksyms generation;
+ * source code should #include dixfonts.h instead, which pulls in these
+ * declarations from X11/fonts/fontproto.h
+ */
+extern _X_EXPORT int client_auth_generation(ClientPtr client);
+
+extern _X_EXPORT void DeleteFontClientID(Font id);
+
+extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
+
+extern _X_EXPORT int GetDefaultPointSize(void);
+
+extern _X_EXPORT Font GetNewFontClientID(void);
+
+extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
+  BlockHandlerProcPtr block_handler);
+
+extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
+  InitFpeFunc init_func,
+  FreeFpeFunc free_func,
+  ResetFpeFunc reset_func,
+  

[PATCH] dix: fix redundant redeclaration warnings in dixfont

2012-10-16 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These functions are already declared in X11/fonts/fontproto.h.
Redeclaring them just for _X_EXPORT causes tons of warnings throughout
xserver, but they need to be declared somewhere to be picked up by
sdksyms.sh.  Doing so in a private header limits the warnings to
sdksyms.c; fixing those as well would require changes to fontsproto.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 dix/dixfonts.c |9 +
 hw/xfree86/sdksyms.sh  |1 +
 include/Makefile.am|2 +-
 include/dixfont.h  |   39 +--
 include/dixfontstubs.h |   45 +
 5 files changed, 57 insertions(+), 39 deletions(-)
 create mode 100644 include/dixfontstubs.h

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index ad21860..feb765d 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1823,12 +1823,14 @@ InitFonts(void)
 register_fpe_functions();
 }
 
+_X_EXPORT
 int
 GetDefaultPointSize(void)
 {
 return 120;
 }
 
+_X_EXPORT
 FontResolutionPtr
 GetClientResolutions(int *num)
 {
@@ -1861,6 +1863,7 @@ GetClientResolutions(int *num)
  * should be called (only once!) by each type of fpe when initialized
  */
 
+_X_EXPORT
 int
 RegisterFPEFunctions(NameCheckFunc name_func,
  InitFpeFunc init_func,
@@ -1932,24 +1935,28 @@ find_old_font(XID id)
 return (FontPtr) pFont;
 }
 
+_X_EXPORT
 Font
 GetNewFontClientID(void)
 {
 return FakeClientID(0);
 }
 
+_X_EXPORT
 int
 StoreFontClientFont(FontPtr pfont, Font id)
 {
 return AddResource(id, RT_NONE, (pointer) pfont);
 }
 
+_X_EXPORT
 void
 DeleteFontClientID(Font id)
 {
 FreeResource(id, RT_NONE);
 }
 
+_X_EXPORT
 int
 client_auth_generation(ClientPtr client)
 {
@@ -1959,6 +1966,7 @@ client_auth_generation(ClientPtr client)
 static int fs_handlers_installed = 0;
 static unsigned int last_server_gen;
 
+_X_EXPORT
 int
 init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
 {
@@ -1977,6 +1985,7 @@ init_fs_handlers(FontPathElementPtr fpe, 
BlockHandlerProcPtr block_handler)
 return Successful;
 }
 
+_X_EXPORT
 void
 remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler,
Bool all)
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index fa19893..48b48b5 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -259,6 +259,7 @@ cat  sdksyms.c  EOF
 #include dixevents.h
 #include dixfont.h
 #include dixfontstr.h
+#include dixfontstubs.h
 #include dixgrabs.h
 #include dixstruct.h
 #include exevents.h
diff --git a/include/Makefile.am b/include/Makefile.am
index 33116f2..5cdea1d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -69,6 +69,6 @@ AM_CFLAGS = $(DIX_CFLAGS)
 
 EXTRA_DIST =   \
dix-config-apple-verbatim.h \
-   eventconvert.h eventstr.h inpututils.h \
+   dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
protocol-versions.h \
xsha1.h
diff --git a/include/dixfont.h b/include/dixfont.h
index 3d09eb5..0a5f105 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -28,6 +28,7 @@ SOFTWARE.
 #include X11/fonts/font.h
 #include closure.h
 #include X11/fonts/fontstruct.h
+#include X11/fonts/fontproto.h
 
 #define NullDIXFontProp ((DIXFontPropPtr)0)
 
@@ -143,42 +144,4 @@ extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ 
);
 
 extern _X_EXPORT void register_fpe_functions(void);
 
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
-  BlockHandlerProcPtr block_handler);
-
-extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
-  InitFpeFunc init_func,
-  FreeFpeFunc free_func,
-  ResetFpeFunc reset_func,
-  OpenFontFunc open_func,
-  CloseFontFunc close_func,
-  ListFontsFunc list_func,
-  StartLfwiFunc start_lfwi_func,
-  NextLfwiFunc next_lfwi_func,
-  WakeupFpeFunc wakeup_func,
-  ClientDiedFunc client_died,
-  LoadGlyphsFunc load_glyphs,
-  StartLaFunc start_list_alias_func,
-  NextLaFunc next_list_alias_func,
-  SetPathFunc 

[PATCH 0/3] Fix various warnings

2012-10-15 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Yaakov Selkowitz (3):
  dix: fix redundant redeclaration warnings in dixfont
  xfree86: os-support: fix old-style function definition warnings
  Xext: fix unused variable warnings in xf86bigfont.c

 Xext/xf86bigfont.c |   12 -
 dix/dixfonts.c |9 ++
 hw/xfree86/os-support/bus/nobus.c  |2 +-
 hw/xfree86/os-support/shared/agp_noop.c|2 +-
 hw/xfree86/os-support/shared/ioperm_noop.c |4 +-
 hw/xfree86/os-support/stub/stub_init.c |6 ++--
 include/dixfont.h  |   38 
 7 files changed, 16 insertions(+), 57 deletions(-)

-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 1/3] dix: fix redundant redeclaration warnings in dixfont

2012-10-15 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These functions are already declared in X11/fonts/fontproto.h.
Redeclaring them just for _X_EXPORT causes tons of warnings throughout
xserver which can be avoided by handling this in the function
definitions instead.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---

 dix/dixfonts.c|9 +
 include/dixfont.h |   38 --
 2 files changed, 9 insertions(+), 38 deletions(-)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index ad21860..feb765d 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1823,12 +1823,14 @@ InitFonts(void)
 register_fpe_functions();
 }
 
+_X_EXPORT
 int
 GetDefaultPointSize(void)
 {
 return 120;
 }
 
+_X_EXPORT
 FontResolutionPtr
 GetClientResolutions(int *num)
 {
@@ -1861,6 +1863,7 @@ GetClientResolutions(int *num)
  * should be called (only once!) by each type of fpe when initialized
  */
 
+_X_EXPORT
 int
 RegisterFPEFunctions(NameCheckFunc name_func,
  InitFpeFunc init_func,
@@ -1932,24 +1935,28 @@ find_old_font(XID id)
 return (FontPtr) pFont;
 }
 
+_X_EXPORT
 Font
 GetNewFontClientID(void)
 {
 return FakeClientID(0);
 }
 
+_X_EXPORT
 int
 StoreFontClientFont(FontPtr pfont, Font id)
 {
 return AddResource(id, RT_NONE, (pointer) pfont);
 }
 
+_X_EXPORT
 void
 DeleteFontClientID(Font id)
 {
 FreeResource(id, RT_NONE);
 }
 
+_X_EXPORT
 int
 client_auth_generation(ClientPtr client)
 {
@@ -1959,6 +1966,7 @@ client_auth_generation(ClientPtr client)
 static int fs_handlers_installed = 0;
 static unsigned int last_server_gen;
 
+_X_EXPORT
 int
 init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
 {
@@ -1977,6 +1985,7 @@ init_fs_handlers(FontPathElementPtr fpe, 
BlockHandlerProcPtr block_handler)
 return Successful;
 }
 
+_X_EXPORT
 void
 remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler,
Bool all)
diff --git a/include/dixfont.h b/include/dixfont.h
index 3d09eb5..1abf9ec 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -143,42 +143,4 @@ extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ 
);
 
 extern _X_EXPORT void register_fpe_functions(void);
 
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
-  BlockHandlerProcPtr block_handler);
-
-extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
-  InitFpeFunc init_func,
-  FreeFpeFunc free_func,
-  ResetFpeFunc reset_func,
-  OpenFontFunc open_func,
-  CloseFontFunc close_func,
-  ListFontsFunc list_func,
-  StartLfwiFunc start_lfwi_func,
-  NextLfwiFunc next_lfwi_func,
-  WakeupFpeFunc wakeup_func,
-  ClientDiedFunc client_died,
-  LoadGlyphsFunc load_glyphs,
-  StartLaFunc start_list_alias_func,
-  NextLaFunc next_list_alias_func,
-  SetPathFunc set_path_func);
-
-extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr blockHandler,
- Bool all);
-
-extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
-
 #endif  /* DIXFONT_H */
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/3] xfree86: os-support: fix old-style function definition warnings

2012-10-15 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/os-support/bus/nobus.c  |2 +-
 hw/xfree86/os-support/shared/agp_noop.c|2 +-
 hw/xfree86/os-support/shared/ioperm_noop.c |4 ++--
 hw/xfree86/os-support/stub/stub_init.c |6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/xfree86/os-support/bus/nobus.c 
b/hw/xfree86/os-support/bus/nobus.c
index dca58fe..dc36ecd 100644
--- a/hw/xfree86/os-support/bus/nobus.c
+++ b/hw/xfree86/os-support/bus/nobus.c
@@ -1,5 +1,5 @@
 static void
-__noop_to_appease_ar__()
+__noop_to_appease_ar__(void)
 {
 return;
 }
diff --git a/hw/xfree86/os-support/shared/agp_noop.c 
b/hw/xfree86/os-support/shared/agp_noop.c
index 9c6ed4b..da486c0 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -47,7 +47,7 @@ xf86GARTCloseScreen(int screenNum)
 }
 
 Bool
-xf86AgpGARTSupported()
+xf86AgpGARTSupported(void)
 {
 return FALSE;
 }
diff --git a/hw/xfree86/os-support/shared/ioperm_noop.c 
b/hw/xfree86/os-support/shared/ioperm_noop.c
index 30688c0..eeacee9 100644
--- a/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -36,13 +36,13 @@
 #include xf86_OSlib.h
 
 Bool
-xf86EnableIO()
+xf86EnableIO(void)
 {
 return TRUE;
 }
 
 void
-xf86DisableIO()
+xf86DisableIO(void)
 {
 return;
 }
diff --git a/hw/xfree86/os-support/stub/stub_init.c 
b/hw/xfree86/os-support/stub/stub_init.c
index 629675d..d3e0c3f 100644
--- a/hw/xfree86/os-support/stub/stub_init.c
+++ b/hw/xfree86/os-support/stub/stub_init.c
@@ -5,12 +5,12 @@
 #include xf86_OSlib.h
 
 void
-xf86OpenConsole()
+xf86OpenConsole(void)
 {
 }
 
 void
-xf86CloseConsole()
+xf86CloseConsole(void)
 {
 }
 
@@ -21,6 +21,6 @@ xf86ProcessArgument(int argc, char *argv[], int i)
 }
 
 void
-xf86UseMsg()
+xf86UseMsg(void)
 {
 }
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 3/3] Xext: fix unused variable warnings in xf86bigfont.c

2012-10-15 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

These were rendered unused by commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xext/xf86bigfont.c |   12 
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index faf81f7..46b3242 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -296,8 +296,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
 #endif
 };
 if (client-swapped) {
-char tmp;
-
 swaps(reply.sequenceNumber);
 swapl(reply.length);
 swaps(reply.majorVersion);
@@ -313,8 +311,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
 static void
 swapCharInfo(xCharInfo * pCI)
 {
-char tmp;
-
 swaps(pCI-leftSideBearing);
 swaps(pCI-rightSideBearing);
 swaps(pCI-characterWidth);
@@ -585,8 +581,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 reply-shmid = shmid;
 reply-shmsegoffset = 0;
 if (client-swapped) {
-char tmp;
-
 swaps(reply-sequenceNumber);
 swapl(reply-length);
 swapCharInfo(reply-minBounds);
@@ -613,8 +607,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 prFP-name = pFP-name;
 prFP-value = pFP-value;
 if (client-swapped) {
-char tmp;
-
 swapl(prFP-name);
 swapl(prFP-value);
 }
@@ -636,8 +628,6 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 for (j = 0; j  nCharInfos; j++, ps++) {
 *ps = pIndex2UniqIndex[j];
 if (client-swapped) {
-char tmp;
-
 swaps(ps);
 }
 }
@@ -673,7 +663,6 @@ static int
 SProcXF86BigfontQueryVersion(ClientPtr client)
 {
 REQUEST(xXF86BigfontQueryVersionReq);
-char tmp;
 
 swaps(stuff-length);
 return ProcXF86BigfontQueryVersion(client);
@@ -683,7 +672,6 @@ static int
 SProcXF86BigfontQueryFont(ClientPtr client)
 {
 REQUEST(xXF86BigfontQueryFontReq);
-char tmp;
 
 swaps(stuff-length);
 REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xproto] Do not use visibility attributes on MinGW

2012-10-15 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xfuncproto.h.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 3eac5d5..8256fec 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -83,7 +83,7 @@ in this Software without prior written authorization from The 
Open Group.
 #endif /* GNUC = 4 */
 
 /* Added in X11R6.9, so available in any version of modular xproto */
-#if defined(__GNUC__)  (__GNUC__ = 4)  !defined(__CYGWIN__)
+#if defined(__GNUC__)  (__GNUC__ = 4)  !defined(__CYGWIN__)  
!defined(__MINGW32__)
 # define _X_EXPORT  __attribute__((visibility(default)))
 # define _X_HIDDEN  __attribute__((visibility(hidden)))
 # define _X_INTERNAL__attribute__((visibility(internal)))
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 0/8] GSettings, dialog fixes, buildsystem enhancements

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Yaakov Selkowitz (8):
  Fix location of GtkBuilder UI file
  Add .gitignore
  Use Automake silent rules
  Fix execl call
  Provide default location and filetype in the file chooser
  Use GtkAboutDialog
  Port to GSettings
  Fix fprintf format warning

 .gitignore |   81 +
 configure.ac   |   30 +
 data/Makefile.am   |9 
 data/org.x.Xoo.gschema.xml |   30 ++
 data/xoo.convert   |5 ++
 data/xoo.ui|   95 ++-
 src/Makefile.am|5 +--
 src/callbacks.c|   21 -
 src/config.c   |2 +-
 src/fakedev.h  |1 -
 src/main.c |   29 +
 src/prefs.c|   28 ++--
 src/prefs.h|7 +---
 13 files changed, 171 insertions(+), 172 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 data/org.x.Xoo.gschema.xml
 create mode 100644 data/xoo.convert

-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 1/8] Fix location of GtkBuilder UI file

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Regression introduced in commit 9a256abf7ee11dbe91cef79f3bc002732f81c393.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main.c b/src/main.c
index ac14d97..f85114e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -74,7 +74,7 @@ fakeapp_new (void)
 
   GError *error = NULL;
   builder = gtk_builder_new ();
-  if (!gtk_builder_add_from_file (builder, PKGDATADIR /data/xoo.ui, error))
+  if (!gtk_builder_add_from_file (builder, PKGDATADIR /xoo.ui, error))
 {
g_warning (Coulnd't load builder ui file : %s, error-message);
g_error_free (error);
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 2/8] Add .gitignore

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 .gitignore |   81 
 1 files changed, 81 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..fa45ad2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,81 @@
+#
+#  X.Org module default exclusion patterns
+#  The next section if for module specific patterns
+#
+#  Do not edit the following section
+#  GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+#  Do not edit the following section
+#  Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+#  Add  Override patterns for xload 
+#
+#  Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+# 
+org.x.Xoo.gschema.valid
+xoo
+xoo.exe
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 3/8] Use Automake silent rules

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 401171c..df20e1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AC_INIT([Xoo], 0.8, [r...@openedhand.com])
 AC_CONFIG_SRCDIR([src/main.c])
 
 AM_INIT_AUTOMAKE()
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AM_CONFIG_HEADER(config.h)
 
 AC_ARG_WITH(expat-includes,
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 4/8] Fix execl call

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

xoo --device FILENAME must be a single string when passed to sh -c,
otherwise the arguments are lost.

Also, use symbolic constant SIGKILL for portability.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/callbacks.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/callbacks.c b/src/callbacks.c
index e46314e..9cbdeb8 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -140,6 +140,7 @@ on_select_device (GtkMenuItem * menuitem, FakeApp * app)
 
   if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
 {
+  char cmd[PATH_MAX + 13];
   char *filename;
 
 
@@ -149,9 +150,10 @@ on_select_device (GtkMenuItem * menuitem, FakeApp * app)
 
   /* xxx FIXME, This is gross - just a very nasty hack for now xxx */
 
-  kill (xnest_pid, 9);
+  kill (xnest_pid, SIGKILL);
   sleep (2);
-  execl (/bin/sh, sh, -c, xoo, --device, filename, NULL);
+  sprintf (cmd, xoo --device %s, filename);
+  execl (/bin/sh, sh, -c, cmd, NULL);
 
   g_warning (Failed load device %s\n, filename);
 
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 5/8] Provide default location and filetype in the file chooser

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

*.xml is used instead of application/xml so that the xoo.ui GtkBuilder
interface file isn't shown.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/callbacks.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/callbacks.c b/src/callbacks.c
index 9cbdeb8..499b584 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -130,6 +130,10 @@ void
 on_select_device (GtkMenuItem * menuitem, FakeApp * app)
 {
   GtkWidget *dialog;
+  GtkFileFilter *filter;
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_add_pattern (filter, *.xml);
 
   dialog = gtk_file_chooser_dialog_new (Open Device,
GTK_WINDOW (app-window),
@@ -137,6 +141,8 @@ on_select_device (GtkMenuItem * menuitem, FakeApp * app)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), PKGDATADIR);
+  gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
 
   if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
 {
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xoo 6/8] Use GtkAboutDialog

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Also, use stock About menu item.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 data/xoo.ui |   95 +++
 src/callbacks.c |9 +-
 src/fakedev.h   |1 -
 src/main.c  |   13 ---
 4 files changed, 13 insertions(+), 105 deletions(-)

diff --git a/data/xoo.ui b/data/xoo.ui
index 3219d17..58a74bd 100644
--- a/data/xoo.ui
+++ b/data/xoo.ui
@@ -1,92 +1,6 @@
 ?xml version=1.0 encoding=UTF-8?
 interface
-  !-- interface-requires gtk+ 2.12 --
-  !-- interface-naming-policy toplevel-contextual --
-  object class=GtkWindow id=aboutwindow
-property name=can_focusFalse/property
-property name=title translatable=yesXoo/property
-property name=resizableFalse/property
-property name=type_hintdialog/property
-signal name=delete-event handler=on_delete_event_hide swapped=no/
-child
-  object class=GtkVBox id=vbox3
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=border_width8/property
-property name=spacing8/property
-child
-  object class=GtkLabel id=label6
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=label translatable=yeslt;span 
size=xx-largegt;lt;bgt;Xoolt;/bgt;lt;/spangt;/property
-property name=use_markupTrue/property
-  /object
-  packing
-property name=expandFalse/property
-property name=fillFalse/property
-property name=position0/property
-  /packing
-/child
-child
-  object class=GtkLabel id=label7
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=label translatable=yesA tool for simulating 
X-based small-screen devices./property
-property name=justifycenter/property
-property name=wrapTrue/property
-  /object
-  packing
-property name=expandFalse/property
-property name=fillFalse/property
-property name=position1/property
-  /packing
-/child
-child
-  object class=GtkLabel id=label8
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=label translatable=yeslt;smallgt;Copyright © 
2004 OpenedHand Ltd 
-i...@o-hand.comlt;/smallgt;/property
-property name=use_markupTrue/property
-property name=justifycenter/property
-  /object
-  packing
-property name=expandFalse/property
-property name=fillFalse/property
-property name=position2/property
-  /packing
-/child
-child
-  object class=GtkHButtonBox id=hbuttonbox2
-property name=visibleTrue/property
-property name=can_focusFalse/property
-child
-  object class=GtkButton id=button_about_close
-property name=labelgtk-close/property
-property name=visibleTrue/property
-property name=can_focusTrue/property
-property name=can_defaultTrue/property
-property name=receives_defaultFalse/property
-property name=use_action_appearanceFalse/property
-property name=use_stockTrue/property
-signal name=clicked handler=on_about_close_clicked 
swapped=no/
-  /object
-  packing
-property name=expandFalse/property
-property name=fillFalse/property
-property name=position0/property
-  /packing
-/child
-  /object
-  packing
-property name=expandTrue/property
-property name=fillFalse/property
-property name=position3/property
-  /packing
-/child
-  /object
-/child
-  /object
+  !-- interface-requires gtk+ 3.0 --
   object class=GtkMenuBar id=popupmenubar
 property name=visibleTrue/property
 property name=can_focusFalse/property
@@ -452,12 +366,13 @@ i...@o-hand.comlt;/smallgt;/property
   object class=GtkMenu id=menuitem4_menu
 property name=can_focusFalse/property
 child
-  object class=GtkMenuItem id=about
+  object class=GtkImageMenuItem id=about
+property name=labelgtk-about/property
+property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=use_action_appearanceFalse/property
-property name=label 

[PATCH xoo 7/8] Port to GSettings

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac   |   29 ++---
 data/Makefile.am   |9 +
 data/org.x.Xoo.gschema.xml |   30 ++
 data/xoo.convert   |5 +
 src/Makefile.am|5 +
 src/main.c |   14 ++
 src/prefs.c|   28 ++--
 src/prefs.h|7 +--
 8 files changed, 64 insertions(+), 63 deletions(-)
 create mode 100644 data/org.x.Xoo.gschema.xml
 create mode 100644 data/xoo.convert

diff --git a/configure.ac b/configure.ac
index df20e1f..d8b77dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,33 +21,8 @@ AC_ARG_WITH(expat-lib,
 AC_GNU_SOURCE
 AC_PROG_CC
 AC_PATH_XTRA
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
-AC_ARG_ENABLE(gconf,
-AC_HELP_STRING([--enable-gconf], [Use GConf for preferences 
@:@default=auto@:@]),
-,enable_gconf=auto)
-GCONF_REQ=
-if test x$enable_gconf = xyes; then
-  GCONF_REQ=gconf-2.0
-else
-  if test x$enable_gconf != xno; then
-AC_MSG_CHECKING(for GConf)
-if $PKG_CONFIG --exists gconf-2.0; then
-   AC_MSG_RESULT(yes)
-GCONF_REQ=gconf-2.0
-else
-   AC_MSG_RESULT(no)
-fi
-  fi
-fi
-if test -n $GCONF_REQ; then
-AC_DEFINE([HAVE_GCONF], 1, [Defined when GConf is detected])
-fi
-AM_CONDITIONAL(HAVE_GCONF, test -n $GCONF_REQ)
-
-
-dnl TODO: make gconf optional
-PKG_CHECK_MODULES(APP, [gtk+-3.0 $GCONF_REQ])
+GLIB_GSETTINGS
+PKG_CHECK_MODULES(APP, [gtk+-3.0])
 
 dnl -- XTest 
 
diff --git a/data/Makefile.am b/data/Makefile.am
index ccd41d4..d38cf00 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -12,3 +12,12 @@ dist_desktop_DATA = xoo.desktop
 
 pixmapdir = $(datadir)/pixmaps
 dist_pixmap_DATA = xoo.png
+
+convertdir = $(datadir)/GConf/gsettings
+dist_convert_DATA = xoo.convert
+
+gsettings_SCHEMAS = org.x.Xoo.gschema.xml
+
+@GSETTINGS_RULES@
+
+EXTRA_DIST = $(gsettings_SCHEMAS)
diff --git a/data/org.x.Xoo.gschema.xml b/data/org.x.Xoo.gschema.xml
new file mode 100644
index 000..17c56f7
--- /dev/null
+++ b/data/org.x.Xoo.gschema.xml
@@ -0,0 +1,30 @@
+?xml version='1.0' encoding='utf-8'?
+schemalist
+  schema id=org.x.Xoo path=/org/x/Xoo/
+
+key name=display type=s
+  default':1'/default
+  summaryX Display/summary
+  descriptionDisplay string to be passed to the embedded X 
server/description
+/key
+
+key name=xserver type=s
+  default'/usr/bin/Xephyr'/default
+  summaryX Server/summary
+  descriptionFully-qualified path to the embedded X server (Xephyr or 
Xnest)/description
+/key
+
+key name=xserver-options type=s
+  default'-ac'/default
+  summaryX Server Options/summary
+  descriptionOptions to be passed to the embedded X server/description
+/key
+
+key name=startup-command type=s
+  default''/default
+  summaryStartup Command/summary
+  descriptionCommand to be launched within the embedded X 
server/description
+/key
+
+  /schema
+/schemalist
diff --git a/data/xoo.convert b/data/xoo.convert
new file mode 100644
index 000..8faab64
--- /dev/null
+++ b/data/xoo.convert
@@ -0,0 +1,5 @@
+[org.x.Xoo]
+display = /apps/Xoo/display
+xserver = /apps/Xoo/xserver
+xserver-options = /apps/Xoo/xserver-options
+startup-command = /apps/Xoo/startup-command
diff --git a/src/Makefile.am b/src/Makefile.am
index ed8b5bd..900f70f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,6 @@
 INCLUDES = -DPKGDATADIR=\$(pkgdatadir)\ @APP_CFLAGS@ @EXPAT_CFLAGS@ 
@X_CFLAGS@ -Wall
 bin_PROGRAMS = xoo
 
-if HAVE_GCONF
-GCONF_SOURCES = prefs.c prefs.h
-endif
-xoo_SOURCES =  main.c button.c callbacks.h callbacks.c config.c keys.c 
fakedev.h $(GCONF_SOURCES)
+xoo_SOURCES =  main.c button.c callbacks.h callbacks.c config.c keys.c 
fakedev.h prefs.c prefs.h
 
 xoo_LDADD = @APP_LIBS@ @EXPAT_LIBS@ @X_LIBS@ @XTEST_LIBS@
diff --git a/src/main.c b/src/main.c
index 83a0e31..d5806cb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -114,7 +114,6 @@ fakeapp_new (void)
   g_signal_connect (G_OBJECT (widget), activate,
   G_CALLBACK (on_select_device), app);
 
-#if HAVE_GCONF
   widget = GTK_WIDGET (gtk_builder_get_object (builder, preferences));
   g_signal_connect (G_OBJECT (widget), activate,
   G_CALLBACK (on_preferences_activate), app);
@@ -126,11 +125,7 @@ fakeapp_new (void)
   widget = GTK_WIDGET (gtk_builder_get_object (builder, button_close));
   g_signal_connect (G_OBJECT (widget), clicked,
   G_CALLBACK (on_prefs_cancel_clicked), app);
-#else
-  widget = GTK_WIDGET (gtk_builder_get_object (builder, preferences));
-  gtk_widget_hide (widget);
 
-#endif
   widget = GTK_WIDGET (gtk_builder_get_object (builder, window));
   app-window = widget;
   widget = GTK_WIDGET (gtk_builder_get_object (builder, menubar));
@@ -167,9 

[PATCH xoo 8/8] Fix fprintf format warning

2012-10-10 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

config.c:327:9: warning: format '%d' expects type 'int', but argument 3
has type 'XML_Size'

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/config.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/config.c b/src/config.c
index 07a70c4..4d3e175 100644
--- a/src/config.c
+++ b/src/config.c
@@ -322,7 +322,7 @@ config_init (FakeApp * app, char *conf_file)
 
   if (!XML_Parse (p, data, strlen (data), 1))
 {
-  fprintf (stderr, XML Parse error at line %d:\n%s\n,
+  fprintf (stderr, XML Parse error at line %lu:\n%s\n,
   XML_GetCurrentLineNumber (p),
   XML_ErrorString (XML_GetErrorCode (p)));
   exit (1);
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH qxl 1/2] Add XORG_LIBS to LIBADD

2012-09-28 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This affects only Cygwin (on which only spiceqxl is supported), where
drivers must be linked against the Xorg implib.  On other systems,
XORG_LIBS will be empty.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 45ba8c9..0d70c83 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,7 +61,7 @@ spiceqxl_drv_ladir = @moduledir@/drivers
 
 spiceqxl_drv_la_CFLAGS = -DXSPICE $(AM_CFLAGS) $(SPICE_CFLAGS)
 
-spiceqxl_drv_la_LIBADD = uxa/libuxa.la
+spiceqxl_drv_la_LIBADD = uxa/libuxa.la $(XORG_LIBS)
 
 spiceqxl_drv_la_SOURCES =  \
qxl.h   \
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH qxl 2/2] Only include Xv headers if server supports it

2012-09-28 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/qxl.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/qxl.h b/src/qxl.h
index 8494550..2583c72 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -37,7 +37,9 @@
 #endif
 #include xf86Cursor.h
 #include xf86_OSproc.h
+#ifdef XV
 #include xf86xv.h
+#endif
 #include xf86Crtc.h
 #include shadow.h
 #include micmap.h
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: Installing proto pc files in /usr/share/pkgconfig?

2012-09-27 Thread Yaakov (Cygwin/X)
On Tue, 2012-09-25 at 06:00 -0700, Dan Nicholson wrote: 
 1. As you demonstrated (and speaking as a pkg-config maintainer),
 pkg-config does not treat /usr/share/pkgconfig the way you want it to.
 It's mean to be for a multiarch system sharing the same root, not for
 a cross-compile scenario where you're trying to minimize pollution
 from the host root. pkg-config has no code that guarantee's things in
 /usr/share/pkgconfig are cross-compile safe.

xorg-util-macros, xorg-sgml-doctools, and xcb-proto are relevant
examples of .pc files in /usr/share/pkgconfig which can be safely used
for cross-compiling.  Other similar examples are gtk-doc and mm-common.

There are also a few cross-platform header-only packages, either protos
(e.g. spice-protocol) or C++ template libraries (e.g. Eigen).  But in
these cases, the headers are in dedicated subdirectories
(-I/usr/include/spice-1, -I/usr/include/eigen3) and therefore won't pull
in the native build system headers.  Unfortunately, I don't think we
could go that route with our protos, as it wouldn't be compatible with
non-pkg-config uses of X, of which there are still plenty.

 3. I think making this change doesn't actually affect your situation.
 Either way you need to build and install the package supplying the .pc
 file to your cross-root. Suppose the proto packages stay in
 /usr/lib/pkgconfig and you avoid them for your setup. You still need
 to build those packages with your cross-root paths. If these proto
 packages start showing up in /usr/share/pkgconfig, you still need to
 build the packages for your new root so the .pc files are found
 earlier in the path than /usr/share/pkgconfig. I imagine you're
 building all the proto packages now for your cross setup, right? How
 does change anything?

You are correct that I have to build the protos for each cross-toolchain
(which is why I was in favour of a unified xproto package when last
proposed).  Putting the .pc files in /usr/share/pkgconfig may lead
someone to try cross-compiling with them though, and then complain when
it doesn't work.  Besides, having files
in /usr/$host/sys-root/$prefix/share/pkgconfig just doesn't look right
to me.


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: Installing proto pc files in /usr/share/pkgconfig?

2012-09-24 Thread Yaakov (Cygwin/X)
On Mon, 2012-09-24 at 07:15 -0700, Dan Nicholson wrote:
 On Sep 23, 2012 9:59 PM, Yaakov (Cygwin/X) wrote:
  
  On 2012-09-23 12:35, Matt Turner wrote:
  The proto packages install their pc files in $(libdir)/pkgconfig, 
  but this leads to files being installed in /usr/lib32 or /usr/lib64 
  when there's nothing ABI specific about them.
 
  Would it be reasonable to install them to $(prefix)/share/pkgconfig 
  instead?
 
  Absolutely NOT.  If you do this, then they will be picked up when 
  cross-compiling, adding e.g. -I/usr/include to CFLAGS, which will
  then cause the build-system's headers to be used instead of the
  cross-host's.
 
 Can you explain how this affects cross-compiling?

Unlike /usr/lib/pkgconfig, /usr/share/pkgconfig is meant to be used even
when cross-compiling.  If you put the *proto.pc in the latter, then
cross-compile anything which requires *proto, pkg-config will use the
native proto and do one of two things:

1) if PKG_CONFIG_SYSTEM_INCLUDE_DIR is unset, no -I flag will be printed
(since by default pkg-config doesn't print -I/-L flags to default search
dirs), in which case the cross-compiler will not find the headers
(since /usr/include isn't in a cross-compiler's default include search
path);

2) or, if PKG_CONFIG_SYSTEM_INCLUDE_DIR is correctly set for
cross-compiling, -I/usr/include will be added to CFLAGS, causing
anything else in /usr/include (e.g. the build-system's native system
headers) to be picked up BEFORE the cross-host's.

There is also the matter of xproto and xtrans not being truly
cross-platform (e.g. NARROWPROTO and FUNCPROTO in Xfuncproto.h), so each
platform anyway needs their own copy.


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: Installing proto pc files in /usr/share/pkgconfig?

2012-09-23 Thread Yaakov (Cygwin/X)

On 2012-09-23 12:35, Matt Turner wrote:

The proto packages install their pc files in $(libdir)/pkgconfig, but
this leads to files being installed in /usr/lib32 or /usr/lib64 when
there's nothing ABI specific about them.

Would it be reasonable to install them to $(prefix)/share/pkgconfig instead?


Absolutely NOT.  If you do this, then they will be picked up when 
cross-compiling, adding e.g. -I/usr/include to CFLAGS, which will then 
cause the build-system's headers to be used instead of the cross-host's.



Yaakov
Cygwin/X

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix compilation of Xorg DDX without XF86VIDMODE

2012-09-06 Thread Yaakov (Cygwin/X)
On Thu, 2012-09-06 at 14:19 +0100, Jon TURNEY wrote:
 Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting
 xf86vmode.c back under the XF86VIDMODE automake conditional it was
 accidentally taken out of.

Tested-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 1/4] shadowfb calls GetGlyphs() so list libXfont as a dependency

2012-06-28 Thread Yaakov (Cygwin/X)
On Thu, 2012-06-28 at 15:15 -0700, Alan Coopersmith wrote:
 Okay, how about we make the compiler think they have the same name (so
 we don't have to go fix all the callers right away) while letting the
 linker use a new name so there's no clash?
 
 Try #3 attached.

How does the saying go, third time's the charm?

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 1/4] shadowfb calls GetGlyphs() so list libXfont as a dependency

2012-06-25 Thread Yaakov (Cygwin/X)
On Sun, 2012-06-24 at 09:31 -0700, Alan Coopersmith wrote: 
 I was thinking of making it so that libXfont didn't call those functions
 directly, but required the caller to call a new init callbacks API that
 passed in pointers to them, much like the RegisterFPEFunctions functions
 does for each font backend.  Alternatively, we could just drop the weak
 stubs and require all callers to provide all those functions - currently
 I see three remaining users of libXfont - the X server, xfs,  bdftopcf.
 I suspect for bdftopcf the best long term plan is to move it to using
 freetype instead of libXfont, and then we're left with the two servers
 which already implement most of those functions and shouldn't need weak
 versions, but that wouldn't allow -no-undefined linking for it, while
 an init callbacks API would.

Right, I suspect the first option would be better.

 But in looking at what it would take to do that I found a much simpler
 solution for this case, since GetGlyphs() is not a weak-linked function,
 and not used by anything but the X server  its modules, and is just a
 simple wrapper around the public API of libXfont, not using any private
 implementation details - just move it to the Xserver.   It's even already
 listed in dixfonts.h as a function the X server exports, so this is just
 simplifying the linker work to make it available to callers.
 
 So replace the original [PATCH 1/4] with the following which adds
 GetGlyphs() to dixfonts.c, making all platforms export it from the same
 binary, instead of differing based on how libXfont is linked.

Sorry, but that doesn't work either:

/usr/lib/libXfont.a(fontutil.o): In function `GetGlyphs':
libXfont/src/util/fontutil.c:54: multiple definition of `_GetGlyphs'
../../dix/.libs/libdix.a(dixfonts.o):dix/dixfonts.c:123: first defined
here


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 0/3] Make pseudoramiX available to hw/xwin

2012-06-25 Thread Yaakov (Cygwin/X)
On Fri, 2012-06-22 at 14:56 +0100, Jon TURNEY wrote: 
 Jon TURNEY (3):
   Various fixes for pseudoramiX.c
   Fix pseudoramiX.c compilation without darwin.h
   Move pseudoramiX code from hw/xquartz to top-level
 
  Makefile.am |2 +
  configure.ac|1 +
  hw/xquartz/Makefile.am  |1 -
  hw/xquartz/mach-startup/Makefile.am |1 +
  hw/xquartz/pseudoramiX.c|  484 
  hw/xquartz/pseudoramiX.h|   11 -
  hw/xwin/Makefile.am |2 +
  pseudoramiX/Makefile.am |7 +
  pseudoramiX/pseudoramiX.c   |  515 
 +++
  pseudoramiX/pseudoramiX.h   |   11 +
  10 files changed, 539 insertions(+), 496 deletions(-)
  delete mode 100644 hw/xquartz/pseudoramiX.c
  delete mode 100644 hw/xquartz/pseudoramiX.h
  create mode 100644 pseudoramiX/Makefile.am
  create mode 100644 pseudoramiX/pseudoramiX.c
  create mode 100644 pseudoramiX/pseudoramiX.h

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 1/4] shadowfb calls GetGlyphs() so list libXfont as a dependency

2012-06-23 Thread Yaakov (Cygwin/X)

On 2012-06-22 23:59, Alan Coopersmith wrote:

Blargh.   On Solaris you have to link libXfont just right to avoid the weak
symbols being linked wrong and overriding the symbols from Xorg, which leaves
Xorg unable to start because it can't even find the builtin fonts.


That's exactly what happens on Cygwin as well with a shared libXfont.


Maybe its time to finally make libXfont stop being a 900 lb. weakling.


How exactly?


Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 1/4] shadowfb calls GetGlyphs() so list libXfont as a dependency

2012-06-21 Thread Yaakov (Cygwin/X)

On 2012-06-21 19:52, Alan Coopersmith wrote:

diff --git a/configure.ac b/configure.ac
index fb3d120..7047d97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -813,9 +813,10 @@ LIBSELINUX=libselinux = 2.0.86
  LIBDBUS=dbus-1 = 1.0
  LIBPIXMAN=pixman-1 = 0.21.8

-dnl Pixman is always required, but we separate it out so we can link
-dnl specific modules against it
+dnl Pixman  libXfont are always required, but we separate them out so we can
+dnl link specific modules against them
  PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
+PKG_CHECK_MODULES(XFONT, $LIBXFONT)
  REQUIRED_LIBS=$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau

  dnl Core modules for most extensions, et al.
diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
index 5756fca..4a2cbff 100644
--- a/hw/xfree86/shadowfb/Makefile.am
+++ b/hw/xfree86/shadowfb/Makefile.am
@@ -1,7 +1,7 @@
  module_LTLIBRARIES = libshadowfb.la
  libshadowfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
  libshadowfb_la_SOURCES = sfbmodule.c shadow.c
-libshadowfb_la_LIBADD = $(PIXMAN_LIBS)
+libshadowfb_la_LIBADD = $(PIXMAN_LIBS) $(XFONT_LIBS)


This is a problem for Cygwin, as we are forced to use a static libXfont 
due to limitations in weak symbol linkage; the libXfont symbols end up 
exported from Xorg itself.  Since libtool will not allow linking a 
shared library against a static one, we'll end up with a static shadowfb 
module, which obviously won't be very useful.



Yaakov
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 0/4] no-undefined linking for xorg-server on Solaris

2012-06-21 Thread Yaakov (Cygwin/X)

On 2012-06-21 19:52, Alan Coopersmith wrote:

Alan Coopersmith (4):
   shadowfb calls GetGlyphs() so list libXfont as a dependency


See my reply to this patch.


   Build tda9885.c functions into fi1236 to avoid libtool relinking
 problems
   Add pixman to module dependencies for pixman_region_* functions
   Enable no-undefined symbols mode in Solaris builds if -z parent is in
 ld (v2)


For patches 2-4:

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PULL] CryptoAPI, build fixes

2012-05-04 Thread Yaakov (Cygwin/X)

The following changes since commit 97041364a6acb2b66b5cfd06757c90a006ad50e9:

  Merge remote-tracking branch 'whot/for-keith' (2012-05-02 20:47:25 -0700)

are available in the git repository at:


  git://people.freedesktop.org/~yselkowitz/xserver.git master

for you to fetch changes up to e501c34d4937d5e6f19abd29f1ec7f95faa3bb55:

  hw/xwin/glx: Use silent rules (2012-05-04 13:13:57 -0500)


Yaakov Selkowitz (4):
  os: Add CryptoAPI as a choice of SHA1 implementation
  xfree86: respect EXEEXT in relink target
  xfree86: use silent rules with sdksyms generation
  hw/xwin/glx: Use silent rules

 configure.ac|   15 ++-
 hw/xfree86/Makefile.am  |4 ++--
 hw/xwin/glx/Makefile.am |4 ++--
 include/dix-config.h.in |3 +++
 os/xsha1.c  |   42 ++
 5 files changed, 63 insertions(+), 5 deletions(-)
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] hw/xwin/glx: Use silent rules

2012-05-01 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xwin/glx/Makefile.am |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am
index 6b840ba..7222a9f 100644
--- a/hw/xwin/glx/Makefile.am
+++ b/hw/xwin/glx/Makefile.am
@@ -32,10 +32,10 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
 if XWIN_GLX_WINDOWS
 
 generated_gl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.spec 
$(KHRONOS_SPEC_DIR)/gl.tm
-   $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec 
--typemap=$(KHRONOS_SPEC_DIR)/gl.tm 
--dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers 
generated_gl_wrappers.c
+   $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py 
--spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm 
--dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers 
generated_gl_wrappers.c
 
 generated_wgl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wglext.spec 
$(KHRONOS_SPEC_DIR)/wgl.tm
-   $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec 
--typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve 
generated_wgl_wrappers.c
+   $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py 
--spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm 
--prefix=wgl --preresolve generated_wgl_wrappers.c
 endif
 
 BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 1/2] xfree86: respect EXEEXT in relink target

2012-04-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index d61c640..6883c2a 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -106,7 +106,7 @@ xorg.conf.example: xorgconf.cpp
$(AM_V_GEN)$(SED) $(CONF_SUBSTS)  $(srcdir)/xorgconf.cpp  $@
 
 relink:
-   $(AM_V_at)rm -f Xorg  $(MAKE) Xorg
+   $(AM_V_at)rm -f Xorg$(EXEEXT)  $(MAKE) Xorg$(EXEEXT)
 
 CLEANFILES = sdksyms.c sdksyms.dep
 EXTRA_DIST += sdksyms.sh
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/2] xfree86: use silent rules with sdksyms generation

2012-04-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 6883c2a..e50cb88 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -112,7 +112,7 @@ CLEANFILES = sdksyms.c sdksyms.dep
 EXTRA_DIST += sdksyms.sh
 
 sdksyms.dep sdksyms.c: sdksyms.sh
-   CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) 
$(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
+   $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh 
$(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
 
 SDKSYMS_DEP = sdksyms.dep
 include $(SDKSYMS_DEP)
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] os: Add CryptoAPI as a choice of SHA1 implementation

2012-04-26 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Both Cygwin and MinGW can use Windows' native CryptoAPI for SHA1,
saving a dependency on libgcrypt or OpenSSL.  The necessary functions
are in ADVAPI32.DLL, which is among the default lib flags and is
already used in hw/xwin for accessing the registry.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
Jon, Ryan, any thoughts on this?  From experience, you can tell if you mess
this up because character rendering in GTK+ depends on it.  This would
allow us to drop the libgcrypt dep, although I haven't tried to compare
performance between the implementations.

 configure.ac|   15 ++-
 include/dix-config.h.in |3 +++
 os/xsha1.c  |   42 ++
 3 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4afac82..5289555 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1350,7 +1350,7 @@ CORE_INCS='-I$(top_srcdir)/include 
-I$(top_builddir)/include'
 
 # SHA1 hashing
 AC_ARG_WITH([sha1],
-
[AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto],
+
[AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
 [choose SHA1 implementation])])
 AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
 if test x$with_sha1 = x  test x$HAVE_SHA1_IN_LIBC = xyes; then
@@ -1376,6 +1376,19 @@ if test x$with_sha1 = xCommonCrypto; then
[Use CommonCrypto SHA1 functions])
SHA1_LIBS=
 fi
+dnl stdcall functions cannot be tested with AC_CHECK_LIB
+AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include 
windows.h])
+if test x$with_sha1 = x  test x$HAVE_SHA1_IN_CRYPTOAPI = xyes; then
+   with_sha1=CryptoAPI
+fi
+if test x$with_sha1 = xCryptoAPI  test x$HAVE_SHA1_IN_CRYPTOAPI != xyes; 
then
+   AC_MSG_ERROR([CryptoAPI requested but not found])
+fi
+if test x$with_sha1 = xCryptoAPI; then
+   AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
+   [Use CryptoAPI SHA1 functions])
+   SHA1_LIBS=
+fi
 AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
 if test x$with_sha1 = x  test x$HAVE_LIBMD = xyes; then
with_sha1=libmd
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 3fb6413..3c9bbaf 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -148,6 +148,9 @@
 /* Define to use CommonCrypto SHA1 functions */
 #undef HAVE_SHA1_IN_COMMONCRYPTO
 
+/* Define to use CryptoAPI SHA1 functions */
+#undef HAVE_SHA1_IN_CRYPTOAPI
+
 /* Define to use libmd SHA1 functions */
 #undef HAVE_SHA1_IN_LIBMD
 
diff --git a/os/xsha1.c b/os/xsha1.c
index dccce74..fa66c7a 100644
--- a/os/xsha1.c
+++ b/os/xsha1.c
@@ -74,6 +74,48 @@ x_sha1_final(void *ctx, unsigned char result[20])
 return 1;
 }
 
+#elif defined(HAVE_SHA1_IN_CRYPTOAPI)/* Use CryptoAPI for SHA1 */
+
+#define WIN32_LEAN_AND_MEAN
+#include X11/Xwindows.h
+#include wincrypt.h
+
+static HCRYPTPROV hProv;
+
+void *
+x_sha1_init(void)
+{
+HCRYPTHASH *ctx = malloc(sizeof(*ctx));
+
+if (!ctx)
+return NULL;
+CryptAcquireContext(hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 
CRYPT_VERIFYCONTEXT);
+CryptCreateHash(hProv, CALG_SHA1, 0, 0, ctx);
+return ctx;
+}
+
+int
+x_sha1_update(void *ctx, void *data, int size)
+{
+HCRYPTHASH *hHash = ctx;
+
+CryptHashData(*hHash, data, size, 0);
+return 1;
+}
+
+int
+x_sha1_final(void *ctx, unsigned char result[20])
+{
+HCRYPTHASH *hHash = ctx;
+DWORD len = 20;
+
+CryptGetHashParam(*hHash, HP_HASHVAL, result, len, 0);
+CryptDestroyHash(*hHash);
+CryptReleaseContext(hProv, 0);
+free(ctx);
+return 1;
+}
+
 #elif defined(HAVE_SHA1_IN_LIBGCRYPT)   /* Use libgcrypt for SHA1 */
 
 #include gcrypt.h
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 1/4] configure.ac: On MinGW force --disable-xorg and --disable-xv, and --disable-dmx by default

2012-04-25 Thread Yaakov (Cygwin/X)

On 2012-04-25 07:11, Jon TURNEY wrote:

diff --git a/configure.ac b/configure.ac
index 4afac82..868e086 100644
--- a/configure.ac
+++ b/configure.ac
@@ -715,6 +715,9 @@ case $host_os in
XV=no
SYMBOL_VISIBILITY=no
;;
+   mingw*)
+   XV=no
+   ;;
darwin*)
PCI=no
INT10MODULE=no


Can't we make the cygwin* case here into cygwin*|mingw*?

With that change, for the series:
Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PULL] Port hw/xfree86 to Cygwin

2012-04-16 Thread Yaakov (Cygwin/X)

On 2012-04-05 22:02, Yaakov (Cygwin/X) wrote:

The following changes since commit
641a1b9363d59808d2586f9e84847ccc69701482:

test: reset the client before checking the swapped version (2012-03-29
08:14:54 +1000)

are available in the git repository at:

git://people.freedesktop.org/~yselkowitz/xserver.git master

for you to fetch changes up to c7b162555849ab2d4cb195d02d98a40494c5ce55:

xfree86: link modules against Xorg symbols on Cygwin (2012-04-05
21:57:07 -0500)


Yaakov Selkowitz (8):
xf86Crtc: include xf86xv.h only if XV
Cygwin/X: disable all unused or unapplicable extensions in configure
xfree86: allow modules to be built without undefined symbols
os-support: add Cygwin support
loader: add Cygwin support
xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET
xf86Config: load DIX libraries before drivers on Cygwin
xfree86: link modules against Xorg symbols on Cygwin

configure.ac | 25 +
hw/xfree86/Makefile.am | 18 +++---
hw/xfree86/common/xf86Config.c | 5 +
hw/xfree86/common/xf86Init.c | 7 +++
hw/xfree86/dixmods/Makefile.am | 24 ++--
hw/xfree86/dixmods/extmod/Makefile.am | 2 +-
hw/xfree86/dri/Makefile.am | 3 ++-
hw/xfree86/dri2/Makefile.am | 3 ++-
hw/xfree86/exa/Makefile.am | 4 ++--
hw/xfree86/fbdevhw/Makefile.am | 2 +-
hw/xfree86/i2c/Makefile.am | 17 ++---
hw/xfree86/loader/loadmod.c | 18 ++
hw/xfree86/man/xorg.conf.man | 2 +-
hw/xfree86/modes/xf86Crtc.c | 2 ++
hw/xfree86/os-support/xf86_OSlib.h | 2 +-
hw/xfree86/shadowfb/Makefile.am | 3 ++-
hw/xfree86/vbe/Makefile.am | 5 -
hw/xfree86/xaa/Makefile.am | 2 +-
xorg-server.pc.in | 2 +-
19 files changed, 114 insertions(+), 32 deletions(-)


Ping?


Yaakov

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH macros] Fix spacing in XORG_TESTSET_CFLAG

2012-04-03 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 xorg-macros.m4.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 9c8ba84..d589ebd 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1554,7 +1554,7 @@ m4_foreach([flag], m4_cdr($@), [
PREFIX[FLAGS]=$PREFIX[FLAGS] ]flag[
 
 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
-   AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
+   AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
AC_CACHE_VAL($cacheid,
 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH xserver 2/2] xfree86: add support for Cygwin

2012-03-29 Thread Yaakov (Cygwin/X)

On 2012-03-29 01:33, Mark Kettenis wrote:

The server builds fine with (Open)BSD make, and we'd like to keep it
that way.  And it doesn't support -C.


Sigh.  I guess I'll have to spell it out then.


Or perhaps explain the problem you're trying to solve?


Those directories include both convenience libs which go into Xorg 
itself, and modules which (on Cygwin) need to be built after Xorg.



Including . in SUBDIRS seems like a gross hack to me as well.


Building Xorg in Cygwin is the gross hack, so that's par for the 
course. :-)



Yaakov
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 0/8] Port hw/xfree86 to Cygwin (take two)

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This is just the xserver patches, broken out and modified to address
received comments.  See the first thread for the driver patches, which
are unchanged.

Yaakov Selkowitz (8):
  xf86Crtc: include xf86xv.h only if XV
  Cygwin/X: disable all unused or unapplicable extensions in configure
  xfree86: allow modules to be built without undefined symbols
  os-support: add Cygwin support
  loader: add Cygwin support
  xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET
  xf86Config: load DIX libraries before drivers on Cygwin
  xfree86: link modules against Xorg symbols on Cygwin

 configure.ac  |   25 +
 hw/xfree86/Makefile.am|   18 +++---
 hw/xfree86/common/xf86Config.c|5 +
 hw/xfree86/common/xf86Init.c  |7 +++
 hw/xfree86/dixmods/Makefile.am|   24 ++--
 hw/xfree86/dixmods/extmod/Makefile.am |2 +-
 hw/xfree86/dri/Makefile.am|3 ++-
 hw/xfree86/dri2/Makefile.am   |3 ++-
 hw/xfree86/exa/Makefile.am|4 ++--
 hw/xfree86/fbdevhw/Makefile.am|2 +-
 hw/xfree86/i2c/Makefile.am|   17 ++---
 hw/xfree86/loader/loadmod.c   |   18 ++
 hw/xfree86/man/xorg.conf.man  |2 +-
 hw/xfree86/modes/xf86Crtc.c   |2 ++
 hw/xfree86/os-support/xf86_OSlib.h|2 +-
 hw/xfree86/shadowfb/Makefile.am   |3 ++-
 hw/xfree86/vbe/Makefile.am|5 -
 hw/xfree86/xaa/Makefile.am|2 +-
 xorg-server.pc.in |2 +-
 19 files changed, 114 insertions(+), 32 deletions(-)

-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 1/8] xf86Crtc: include xf86xv.h only if XV

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 hw/xfree86/modes/xf86Crtc.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6d5e92f..fee1ae7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -44,7 +44,9 @@
 #include X11/Xatom.h
 #include picturestr.h
 
+#ifdef XV
 #include xf86xv.h
+#endif
 
 #define NO_OUTPUT_DEFAULT_WIDTH 1024
 #define NO_OUTPUT_DEFAULT_HEIGHT 768
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/8] Cygwin/X: disable all unused or unapplicable extensions in configure

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 65d29f2..44fe8e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,11 +699,21 @@ dnl DDX Detection... Yes, it's ugly to have it here... 
but we need to
 dnl handle this early on so that we don't require unsupported extensions
 case $host_os in
cygwin*)
+   CONFIG_DBUS_API=no
+   CONFIG_HAL=no
+   CONFIG_UDEV=no
DGA=no
DRI2=no
+   INT10MODULE=no
+   PCI=no
+   VGAHW=no
+   VBE=no
+   XAA=no
+   XF86UTILS=no
XF86VIDMODE=no
XSELINUX=no
XV=no
+   SYMBOL_VISIBILITY=no
;;
darwin*)
PCI=no
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 3/8] xfree86: allow modules to be built without undefined symbols

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This will be necessary to port Xorg to Cygwin, but other platforms may
find this useful as well.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac  |4 
 hw/xfree86/dixmods/Makefile.am|   24 ++--
 hw/xfree86/dixmods/extmod/Makefile.am |2 +-
 hw/xfree86/dri/Makefile.am|3 ++-
 hw/xfree86/dri2/Makefile.am   |3 ++-
 hw/xfree86/exa/Makefile.am|4 ++--
 hw/xfree86/fbdevhw/Makefile.am|2 +-
 hw/xfree86/i2c/Makefile.am|   17 ++---
 hw/xfree86/shadowfb/Makefile.am   |3 ++-
 hw/xfree86/vbe/Makefile.am|5 -
 hw/xfree86/xaa/Makefile.am|2 +-
 11 files changed, 43 insertions(+), 26 deletions(-)

diff --git a/configure.ac b/configure.ac
index 44fe8e2..8de2563 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1070,6 +1070,7 @@ if test x$GLX_USE_TLS = xyes ; then
GLX_SYS_LIBS=$GLX_SYS_LIBS -lpthread
 fi
 AC_SUBST([GLX_DEFINES])
+AC_SUBST([GLX_SYS_LIBS])
 
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test x$DRI = xyes; then
@@ -1471,7 +1472,10 @@ AC_SUBST([UTILS_SYS_LIBS])
 # Some platforms require extra flags to do this.   libtool should set the
 # necessary flags for each platform when -export-dynamic is passed to it.
 LD_EXPORT_SYMBOLS_FLAG=-export-dynamic
+LD_NO_UNDEFINED_FLAG=
 AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
+AC_SUBST([LD_NO_UNDEFINED_FLAG])
+AM_CONDITIONAL([NO_UNDEFINED], [test x$LD_NO_UNDEFINED_FLAG != x])
 
 dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
 dnl we need to replicate that here until those can all be fixed
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index a5be3ae..6f4af6c 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -30,35 +30,39 @@ INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/miext/shadow \
-I$(top_srcdir)/glx
 
-libdbe_la_LDFLAGS = -module -avoid-version
+libdbe_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la
 libdbe_la_SOURCES = dbemodule.c
 
-libfb_la_LDFLAGS = -module -avoid-version
+libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
 libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
 libfb_la_CFLAGS = $(AM_CFLAGS)
 
-libwfb_la_LDFLAGS = -module -avoid-version
+libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
 libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
 libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
 
-libglx_la_LDFLAGS = -module -avoid-version
+libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
 if AIGLX_DRI_LOADER
-GLXDRI_LIBRARY = $(top_builddir)/glx/libglxdri.la
+libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
+if NO_UNDEFINED
+libglx_la_LIBADD += ../dri/libdri.la ../dri2/libdri2.la
+endif
 endif
-libglx_la_LIBADD = \
-   $(top_builddir)/glx/libglx.la \
-   $(GLXDRI_LIBRARY)
 libglx_la_SOURCES = glxmodule.c
 
-librecord_la_LDFLAGS = -module -avoid-version
+librecord_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 librecord_la_LIBADD = $(top_builddir)/record/librecord.la
 librecord_la_SOURCES = recordmod.c
 
-libshadow_la_LDFLAGS = -module -avoid-version
+libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
+if NO_UNDEFINED
+libshadow_la_LIBADD += libfb.la
+endif
 libshadow_la_SOURCES = shmodule.c
 
 libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am 
b/hw/xfree86/dixmods/extmod/Makefile.am
index 87c28a4..d08e9ad 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -21,7 +21,7 @@ INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/hw/xfree86/loader \
-I$(top_srcdir)/miext/shadow
 
-libextmod_la_LDFLAGS = -module -avoid-version
+libextmod_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libextmod_la_SOURCES = modinit.c \
modinit.h \
$(DGA_SRCS) \
diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index a7b491c..194cf8e 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -12,7 +12,8 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
@DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ \
@DRI_CFLAGS@
-libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
+libdri_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+libdri_la_LIBADD = @LIBDRM_LIBS@
 libdri_ladir = $(moduledir)/extensions
 

[PATCH 4/8] os-support: add Cygwin support

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/os-support/xf86_OSlib.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/os-support/xf86_OSlib.h 
b/hw/xfree86/os-support/xf86_OSlib.h
index 9161e18..e931b09 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -171,7 +171,7 @@
 /**/
 /* Linux or Glibc-based system*/
 /**/
-#if defined(__linux__) || defined(__GLIBC__)
+#if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__)
 #include sys/ioctl.h
 #include signal.h
 #include stdlib.h
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 5/8] loader: add Cygwin support

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Cygwin libraries use the .dll extension and cyg prefix in place of lib.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/loader/loadmod.c  |   18 ++
 hw/xfree86/man/xorg.conf.man |2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index c6b5590..706b9b3 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -212,9 +212,15 @@ static const char *stdSubdirs[] = {
  * to port this DDX to, say, Darwin, we'll need to fix this.
  */
 static PatternRec stdPatterns[] = {
+#ifdef __CYGWIN__
+{^cyg(.*)\\.dll$,},
+{(.*)_drv\\.dll$,},
+{(.*)\\.dll$,},
+#else
 {^lib(.*)\\.so$,},
 {(.*)_drv\\.so$,},
 {(.*)\\.so$,},
+#endif
 {NULL,}
 };
 
@@ -408,21 +414,33 @@ FindModuleInSubdir(const char *dirpath, const char 
*module)
 continue;
 }
 
+#ifdef __CYGWIN__
+snprintf(tmpBuf, PATH_MAX, cyg%s.dll, module);
+#else
 snprintf(tmpBuf, PATH_MAX, lib%s.so, module);
+#endif
 if (strcmp(direntry-d_name, tmpBuf) == 0) {
 if (asprintf(ret, %s%s, dirpath, tmpBuf) == -1)
 ret = NULL;
 break;
 }
 
+#ifdef __CYGWIN__
+snprintf(tmpBuf, PATH_MAX, %s_drv.dll, module);
+#else
 snprintf(tmpBuf, PATH_MAX, %s_drv.so, module);
+#endif
 if (strcmp(direntry-d_name, tmpBuf) == 0) {
 if (asprintf(ret, %s%s, dirpath, tmpBuf) == -1)
 ret = NULL;
 break;
 }
 
+#ifdef __CYGWIN__
+snprintf(tmpBuf, PATH_MAX, %s.dll, module);
+#else
 snprintf(tmpBuf, PATH_MAX, %s.so, module);
+#endif
 if (strcmp(direntry-d_name, tmpBuf) == 0) {
 if (asprintf(ret, %s%s, dirpath, tmpBuf) == -1)
 ret = NULL;
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 72e5713..da67f59 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -701,7 +701,7 @@ This instructs the server to load the module called
 The module name given should be the module's standard name, not the
 module file name.
 The standard name is case\-sensitive, and does not include the \(lqlib\(rq
-prefix, or the \(lq.a\(rq, \(lq.o\(rq, or \(lq.so\(rq suffixes.
+or \(lqcyg\(rq prefixes, or the \(lq.so\(rq or \(lq.dll\(rq suffixes.
 .PP
 .RS 7
 Example: the DRI extension module can be loaded with the following entry:
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 6/8] xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This is necessary when building Xorg and XWin simultaneously, otherwise
undefined symbol errors result in sdksyms.c.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/common/xf86Init.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 2a7d0a3..f42dd10 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1580,3 +1580,10 @@ xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth)
 else
 return 0;
 }
+
+#ifdef DDXBEFORERESET
+void
+ddxBeforeReset(void)
+{
+}
+#endif
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 7/8] xf86Config: load DIX libraries before drivers on Cygwin

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Cygwin doesn't have ELF rpath capabilities, so these libraries need
to be loaded before the drivers (namely dummy and nested) which
depend on their symbols.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/common/xf86Config.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index ec679df..b22b617 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -125,6 +125,11 @@ static ModuleDefault ModuleDefaults[] = {
 #ifdef DRI2
 {.name = dri2,.toLoad = TRUE,.load_opt = NULL},
 #endif
+#ifdef __CYGWIN__
+/* load DIX modules used by drivers first */
+{.name = fb,.toLoad = TRUE,.load_opt = NULL},
+{.name = shadow,.toLoad = TRUE,.load_opt = NULL},
+#endif
 {.name = NULL,.toLoad = FALSE,.load_opt = NULL}
 };
 
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 8/8] xfree86: link modules against Xorg symbols on Cygwin

2012-03-29 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

As a PE platform, all symbols in both EXEs and DLLs must be resolved
at link time.  As Xorg modules depend on symbols in the Xorg
executable, we must build Xorg before its modules, creating an implib
from the former which is used to link the latter.  This implib must
then be installed in order to build the drivers.

Currently only two drivers are supported on Cygwin: xf86-video-dummy
(to replace Xvfb/Xfake) and xf86-video-nested (to replace Xnest/Xephyr).

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac   |   11 +++
 hw/xfree86/Makefile.am |   18 +++---
 xorg-server.pc.in  |2 +-
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8de2563..8895b68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1473,8 +1473,19 @@ AC_SUBST([UTILS_SYS_LIBS])
 # necessary flags for each platform when -export-dynamic is passed to it.
 LD_EXPORT_SYMBOLS_FLAG=-export-dynamic
 LD_NO_UNDEFINED_FLAG=
+XORG_DRIVER_LIBS=
+case $host_os in
+cygwin*)
+   LD_EXPORT_SYMBOLS_FLAG=-Wl,--export-all,--out-implib,lib\$@.a
+   LD_NO_UNDEFINED_FLAG=-no-undefined 
-Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a
+   XORG_DRIVER_LIBS=-lXorg.exe -L\${moduledir} -lshadow -lfb 
-no-undefined
+   CYGWIN=yes
+   ;;
+esac
 AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
 AC_SUBST([LD_NO_UNDEFINED_FLAG])
+AC_SUBST([XORG_DRIVER_LIBS])
+AM_CONDITIONAL([CYGWIN], [test x$CYGWIN = xyes])
 AM_CONDITIONAL([NO_UNDEFINED], [test x$LD_NO_UNDEFINED_FLAG != x])
 
 dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 72be889..d61c640 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -25,9 +25,9 @@ if INT10MODULE
 INT10_SUBDIR = int10
 endif
 
-SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
- ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
- loader dixmods exa modes \
+SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
+ ramdac $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
+ loader modes . i2c dixmods fbdevhw shadowfb exa \
  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) doc man
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
@@ -92,6 +92,9 @@ if INSTALL_SETUID
chown root $(DESTDIR)$(bindir)/Xorg
chmod u+s $(DESTDIR)$(bindir)/Xorg
 endif
+if CYGWIN
+   $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
+endif
 
 # Use variables from XORG_MANPAGE_SECTIONS and X Server configuration
 # Do not include manpages.am as values are not appropriate for rc files
@@ -113,3 +116,12 @@ sdksyms.dep sdksyms.c: sdksyms.sh
 
 SDKSYMS_DEP = sdksyms.dep
 include $(SDKSYMS_DEP)
+
+i2c/libi2c.la:
+   $(AM_V_at)cd i2c  $(MAKE) libi2c.la
+
+dixmods/libdixmods.la:
+   $(AM_V_at)cd dixmods  $(MAKE) libdixmods.la
+
+dixmods/libxorgxkb.la:
+   $(AM_V_at)cd dixmods  $(MAKE) libxorgxkb.la
diff --git a/xorg-server.pc.in b/xorg-server.pc.in
index a98eca8..1de1c6c 100644
--- a/xorg-server.pc.in
+++ b/xorg-server.pc.in
@@ -17,4 +17,4 @@ Description: Modular X.Org X Server
 Version: @PACKAGE_VERSION@
 Requires.private: @SDK_REQUIRED_MODULES@
 Cflags: -I${sdkdir} @symbol_visibility@
-Libs: -L${libdir}
+Libs: -L${libdir} @XORG_DRIVER_LIBS@
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PULL to discuss] Remove kdrive, Xnest, and Xvfb

2012-03-29 Thread Yaakov (Cygwin/X)

On 2012-03-26 23:09, Jamey Sharp wrote:

On Mon, Mar 26, 2012 at 6:31 PM, Yaakov (Cygwin/X) wrote:

1. Will Xorg even work on Cygwin/MinGW?  (I would ask the same of OS X, but
as the Xquartz maintainer I suppose you know what you are doing.) Even if it
does, I see already it would take some serious patching to build due to the
module-based architecture, which I would be willing to work on.


Ah, that's a good point. Jeremy took care of the issues with running
Xorg on OS X during the 1.12 cycle, but that needs to happen for
Windows too. I'm hopeful that at least some of the work he did will
make that job easier.


I've already got a patchset for Cygwin.  As for MinGW, while many of the 
buildsystem issues are the same, there's the question of porting the 
code (loader and posix_tty jump to mind).



Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 7/8] xf86Config: load DIX libraries before drivers on Cygwin

2012-03-29 Thread Yaakov (Cygwin/X)

On 2012-03-29 10:15, Keith Packard wrote:

On Thu, 29 Mar 2012 03:22:40 -0500, Yaakov (Cygwin/X) wrote:

Cygwin doesn't have ELF rpath capabilities, so these libraries need
to be loaded before the drivers (namely dummy and nested) which
depend on their symbols.


Is the problem here that the drivers aren't linked against these
libraries?


The drivers *are* linked against these libraries (via XORG_DRIVER_LIBS 
in patch 8), but as they reside in $moduledir instead of $libdir, and PE 
doesn't support rpath, they won't be found by the runtime linker unless 
they are loaded first.



Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH xserver 2/2] xfree86: add support for Cygwin

2012-03-28 Thread Yaakov (Cygwin/X)

On 2012-03-28 22:19, Alan Coopersmith wrote:

On 03/27/12 10:16 PM, Yaakov (Cygwin/X) wrote:

As a PE platform, all symbols in both EXEs and DLLs must be resolved
at link time.  As Xorg modules depend on symbols in the Xorg
executable, we must build Xorg before its modules, creating an implib
from the former which is used to link the latter.  This implib must
then be installed in order to build the drivers.


I do something similar when building X11 for Solaris packaging, in order
to catch ABI issues such as missing symbols at build time instead of run
time, and this patch will make it easier for me to do that with all the
modules, while now it mostly just checks drivers due to build ordering.


+
+i2c/libi2c.la:
+   $(MAKE) -C $(@D) $(@F)
+
+dixmods/libdixmods.la:
+   $(MAKE) -C $(@D) $(@F)
+
+dixmods/libxorgxkb.la:
+   $(MAKE) -C $(@D) $(@F)


Should those be $(MAKE) $(AM_MAKEFLAGS) ... ?  That's what most automake calls
seem to use.
Also -C is a gnu make specific flag, but I think we still require GNU make
to build the server due to other issues anyway.


$(MAKE) -C is already used in the top-level Makefile, hw/Makefile, and 
hw/kdrive/Makefile.  But now that you mention it, I see that I forgot 
the $(AM_V_at).



BTW, in my patch in the Solaris tree, I have:
+libfb_la_LIBADD += -lpixman-1


That's not necessary with recent libtools; the DIX fb/libfb.la is 
already linked with $(PIXMAN_LIBS).



+if CYGWIN
+libshadow_la_LIBADD += libfb.la
+endif


I currently patch that in on Solaris too, so would appreciate finding a more
common name than if CYGWIN for this.


How about NO_UNDEFINED?


The current work in progress from our branch to get 1.12 ready to merge in:
http://src.opensolaris.org/source/xref/fox/Xorg-1.12-merge/open-src/xserver/xorg/dixmods-deps.patch


Thanks, I'll incorporate what I can from there.


-prefix, or the \(lq.a\(rq, \(lq.o\(rq, or \(lq.so\(rq suffixes.
+or \(lqcyg\(rq prefixes, or the \(lq.a\(rq, \(lq.o\(rq, \(lq.dll\(rq,
+or \(lq.so\(rq suffixes.


We can probably remove .o  .a from that list now that the old elfloader is 
gone.


OK, I'll get that when I respin these patches.


Yaakov
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PULL to discuss] Remove kdrive, Xnest, and Xvfb

2012-03-27 Thread Yaakov (Cygwin/X)

On 2012-03-26 20:31, Yaakov (Cygwin/X) wrote:

1. Will Xorg even work on Cygwin/MinGW?


Well, it *seems* I got Xorg (1.12 branch) with xf86-video-dummy (0.3.5) 
working, but while xf86-video-nested (git master) will start, clients 
are unable to connect.  I used Alan's conf files and added my own in 
xorg.conf.d:


Section Module
Load fb
Load shadow
Disable kbd
Disable mouse
EndSection

This is due to video-dummy requiring libfb, video-nested requiring both 
libfb and libshadow, and libshadow itself requiring libfb.



Even if it does, I see already it would take some serious patching to
build due to the module-based architecture, which I would be willing to
work on.


The attached draft patch is how I built Xorg 1.12 on Cygwin.  Comments?


Yaakov
Cygwin/X


xorg112-cygwin.patch
Description: application/itunes-itlp
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PULL to discuss] Remove kdrive, Xnest, and Xvfb

2012-03-27 Thread Yaakov (Cygwin/X)

On 2012-03-26 20:01, Alan Coopersmith wrote:

At the very minimum we should ship a couple simple configs such as (guessing at
contents here, someone would need to test and refine):


OK, it looks like I have both of these working on Cygwin now.  I do 
remind everyone that video-nested doesn't have a tarball release yet.



Even better would be to ship Xephyr, Xvfb, Xnest as simple shell scripts that
did basically Xorg -config Xorg-vfb.conf $*  (possibly with some argument
manipulation for other arguments those supported).


(Don't forget Xfake.)  While I think we do need scripts to replace at 
least Xvfb (which is used in building a few packages), what about 
command-line option compatibility?   How do you handle Xvfb -screen 0 
640x480x24 :1 or Xnest -geometry 640x480+100+100 :2 and the like?



Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 0/5] Port hw/xfree86 to Cygwin

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Patches for xserver, xf86-video-dummy, and xf86-video-nested follow.

Yaakov Selkowitz (2):
  xf86Crtc: include xf86xv.h only if XV
  xfree86: add support for Cygwin

 configure.ac  |   24 
 hw/xfree86/Makefile.am|   18 +++---
 hw/xfree86/common/xf86Config.c|5 +
 hw/xfree86/common/xf86Init.c  |7 +++
 hw/xfree86/dixmods/Makefile.am|   16 ++--
 hw/xfree86/dixmods/extmod/Makefile.am |2 +-
 hw/xfree86/exa/Makefile.am|4 ++--
 hw/xfree86/fbdevhw/Makefile.am|2 +-
 hw/xfree86/i2c/Makefile.am|   17 ++---
 hw/xfree86/loader/loadmod.c   |   18 ++
 hw/xfree86/man/xorg.conf.man  |3 ++-
 hw/xfree86/modes/xf86Crtc.c   |2 ++
 hw/xfree86/os-support/xf86_OSlib.h|2 +-
 hw/xfree86/shadowfb/Makefile.am   |3 ++-
 xorg-server.pc.in |2 +-
 15 files changed, 101 insertions(+), 24 deletions(-)

-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xserver 1/2] xf86Crtc: include xf86xv.h only if XV

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/xfree86/modes/xf86Crtc.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6d5e92f..fee1ae7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -44,7 +44,9 @@
 #include X11/Xatom.h
 #include picturestr.h
 
+#ifdef XV
 #include xf86xv.h
+#endif
 
 #define NO_OUTPUT_DEFAULT_WIDTH 1024
 #define NO_OUTPUT_DEFAULT_HEIGHT 768
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xserver 2/2] xfree86: add support for Cygwin

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

As a PE platform, all symbols in both EXEs and DLLs must be resolved
at link time.  As Xorg modules depend on symbols in the Xorg
executable, we must build Xorg before its modules, creating an implib
from the former which is used to link the latter.  This implib must
then be installed in order to build the drivers.

Currently only two drivers are supported on Cygwin: xf86-video-dummy
(to replace Xvfb/Xfake) and xf86-video-nested (to replace Xnest/Xephyr).

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 configure.ac  |   24 
 hw/xfree86/Makefile.am|   18 +++---
 hw/xfree86/common/xf86Config.c|5 +
 hw/xfree86/common/xf86Init.c  |7 +++
 hw/xfree86/dixmods/Makefile.am|   16 ++--
 hw/xfree86/dixmods/extmod/Makefile.am |2 +-
 hw/xfree86/exa/Makefile.am|4 ++--
 hw/xfree86/fbdevhw/Makefile.am|2 +-
 hw/xfree86/i2c/Makefile.am|   17 ++---
 hw/xfree86/loader/loadmod.c   |   18 ++
 hw/xfree86/man/xorg.conf.man  |3 ++-
 hw/xfree86/os-support/xf86_OSlib.h|2 +-
 hw/xfree86/shadowfb/Makefile.am   |3 ++-
 xorg-server.pc.in |2 +-
 14 files changed, 99 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index 65d29f2..33376f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,11 +699,21 @@ dnl DDX Detection... Yes, it's ugly to have it here... 
but we need to
 dnl handle this early on so that we don't require unsupported extensions
 case $host_os in
cygwin*)
+   CONFIG_DBUS_API=no
+   CONFIG_HAL=no
+   CONFIG_UDEV=no
DGA=no
DRI2=no
+   INT10MODULE=no
+   PCI=no
+   VGAHW=no
+   VBE=no
+   XAA=no
+   XF86UTILS=no
XF86VIDMODE=no
XSELINUX=no
XV=no
+   SYMBOL_VISIBILITY=no
;;
darwin*)
PCI=no
@@ -1060,6 +1070,7 @@ if test x$GLX_USE_TLS = xyes ; then
GLX_SYS_LIBS=$GLX_SYS_LIBS -lpthread
 fi
 AC_SUBST([GLX_DEFINES])
+AC_SUBST([GLX_SYS_LIBS])
 
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test x$DRI = xyes; then
@@ -1461,7 +1472,20 @@ AC_SUBST([UTILS_SYS_LIBS])
 # Some platforms require extra flags to do this.   libtool should set the
 # necessary flags for each platform when -export-dynamic is passed to it.
 LD_EXPORT_SYMBOLS_FLAG=-export-dynamic
+LD_NO_UNDEFINED_FLAG=
+XORG_MODULE_LIBS=
+case $host_os in
+cygwin*)
+   LD_EXPORT_SYMBOLS_FLAG=-Wl,--export-all,--out-implib,lib\$@.a
+   LD_NO_UNDEFINED_FLAG=-no-undefined 
-Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a
+   XORG_MODULE_LIBS=-lXorg.exe -L\${moduledir} -lshadow -lfb 
-no-undefined
+   CYGWIN=yes
+   ;;
+esac
 AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
+AC_SUBST([LD_NO_UNDEFINED_FLAG])
+AC_SUBST([XORG_MODULE_LIBS])
+AM_CONDITIONAL([CYGWIN], [test x$CYGWIN = xyes])
 
 dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
 dnl we need to replicate that here until those can all be fixed
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 72be889..c4b7da3 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -25,9 +25,9 @@ if INT10MODULE
 INT10_SUBDIR = int10
 endif
 
-SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
- ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
- loader dixmods exa modes \
+SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
+ ramdac $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
+ loader modes . i2c dixmods fbdevhw shadowfb exa \
  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) doc man
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
@@ -92,6 +92,9 @@ if INSTALL_SETUID
chown root $(DESTDIR)$(bindir)/Xorg
chmod u+s $(DESTDIR)$(bindir)/Xorg
 endif
+if CYGWIN
+   $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
+endif
 
 # Use variables from XORG_MANPAGE_SECTIONS and X Server configuration
 # Do not include manpages.am as values are not appropriate for rc files
@@ -113,3 +116,12 @@ sdksyms.dep sdksyms.c: sdksyms.sh
 
 SDKSYMS_DEP = sdksyms.dep
 include $(SDKSYMS_DEP)
+
+i2c/libi2c.la:
+   $(MAKE) -C $(@D) $(@F)
+
+dixmods/libdixmods.la:
+   $(MAKE) -C $(@D) $(@F)
+
+dixmods/libxorgxkb.la:
+   $(MAKE) -C $(@D) $(@F)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index ec679df..b22b617 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -125,6 +125,11 @@ static ModuleDefault ModuleDefaults[] = {
 #ifdef DRI2
 {.name = dri2,.toLoad = TRUE,.load_opt = NULL},
 #endif

[PATCH dummy 1/2] Only include Xv headers if server supports it

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/dummy.h|4 
 src/dummy_driver.c |2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/dummy.h b/src/dummy.h
index 3442f63..966ab02 100644
--- a/src/dummy.h
+++ b/src/dummy.h
@@ -5,8 +5,10 @@
 
 #include xf86Cursor.h
 
+#ifdef XvExtension
 #include xf86xv.h
 #include X11/extensions/Xv.h
+#endif
 #include string.h
 
 /* Supported chipsets */
@@ -57,7 +59,9 @@ typedef struct dummyRec
 
 Bool screenSaver;
 Bool video;
+#ifdef XvExtension
 XF86VideoAdaptorPtr overlayAdaptor;
+#endif
 int overlay;
 int overlay_offset;
 int videoKey;
diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index 6533b27..791855f 100644
--- a/src/dummy_driver.c
+++ b/src/dummy_driver.c
@@ -32,8 +32,10 @@
 
 #include picturestr.h
 
+#ifdef XvExtension
 #include xf86xv.h
 #include X11/extensions/Xv.h
+#endif
 
 /*
  * Driver data structures.
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH dummy 2/2] Add XORG_LIBS to LIBADD

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This affects only Cygwin, where drivers must be linked against the
Xorg implib.  On other systems, XORG_LIBS will be empty.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/Makefile.am |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 52b9921..4bc9242 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,6 +29,7 @@ AM_CFLAGS = $(XORG_CFLAGS) $(PCIACCESS_CFLAGS)
 
 dummy_drv_la_LTLIBRARIES = dummy_drv.la
 dummy_drv_la_LDFLAGS = -module -avoid-version
+dummy_drv_la_LIBADD = $(XORG_LIBS)
 dummy_drv_ladir = @moduledir@/drivers
 
 dummy_drv_la_SOURCES = \
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH nested] Add XORG_LIBS to LIBADD

2012-03-27 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

This affects only Cygwin, where drivers must be linked against the
Xorg implib.  On other systems, XORG_LIBS will be empty.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 src/Makefile.am |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 57f661d..fd60a31 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,7 +24,8 @@
 AM_CFLAGS = $(XORG_CFLAGS) $(PCIACCESS_CFLAGS) $(X11_CFLAGS) $(XEXT_CFLAGS)
 
 nested_drv_la_LTLIBRARIES = nested_drv.la
-nested_drv_la_LDFLAGS = -module -avoid-version $(X11_LIBS) $(XEXT_LIBS)
+nested_drv_la_LDFLAGS = -module -avoid-version
+nested_drv_la_LIBADD = $(XORG_LIBS) $(X11_LIBS) $(XEXT_LIBS)
 nested_drv_ladir = @moduledir@/drivers
 
 nested_drv_la_SOURCES = driver.c nested_input.c nested_input.h xlibclient.c 
client.h
-- 
1.7.9

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PULL to discuss] Remove kdrive, Xnest, and Xvfb

2012-03-26 Thread Yaakov (Cygwin/X)

On 2012-03-26 18:13, Jeremy Huddleston wrote:

These need to die.  This removes 30K lines of code from xorg-server.

 It must be good!


Most functionality of these servers can be provide by Xorg with either

 the nested or dummy video driver.  If someone really misses

functionality, we should fix that   deficiency in hw/xfree86,

 xf86-video-dummy, or xf86-video-nested.  Also, there's nothing
 stopping anyone from using older server versions if they still need
 these DDXs.


Ok, you may now commence with the flinging of FUD.


As a non-Xorg DDX maintainer, several quick questions that jump to mind:

1. Will Xorg even work on Cygwin/MinGW?  (I would ask the same of OS X, 
but as the Xquartz maintainer I suppose you know what you are doing.) 
Even if it does, I see already it would take some serious patching to 
build due to the module-based architecture, which I would be willing to 
work on.


2. XWin must still provide the /usr/bin/X symlink on Cygwin/MinGW.

3. We would definitely need the wrapper scripts mentioned by Alan to 
replace the removed DDXs.



Yaakov
Cygwin/X
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] pkgconfig files should be installed to $(libdir)

2011-11-23 Thread Yaakov (Cygwin/X)
On Thu, 2011-11-17 at 07:43 -0800, Alan Coopersmith wrote:
 Those are bugs then, they should all use $(datadir).
 
 I know I've had to override some in the past when building distro
 packages, but I thought we'd gotten all those fixes in to git by
 now.

No, they must NOT go into $(datadir)/pkgconfig.  Here's why:

Presume that you install the *proto/xtrans headers/templates
into /usr/include and the .pc files into /usr/share/pkgconfig, then
proceed to use these headers to cross-compile another X.Org component
with a sysroot-capable cross-toolchain, pkg-config will kindly add a
-I/usr/include to your CFLAGS.  This will cause the native system
headers to be picked up instead of the cross-target libc headers,
causing all sorts of compile errors.

Furthermore, X11/Xfuncproto.h and X11/Xpoll.h (from xproto) and
xtrans.pc have system-dependent substitutions, so they cannot be used
for cross-compiling.

Therefore, regarding the original patch:

Reviewed-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xproto] Cygwin/X: Include strings.h early to avoid compile errors

2011-11-14 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

http://lists.x.org/archives/xorg-devel/2011-November/027117.html

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
This should fix Cygwin.  Whether or not to make this unconditional would
require further discussion.

 Xfuncs.h |2 +-
 Xos.h|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Xfuncs.h b/Xfuncs.h
index 354b663..2bcf991 100644
--- a/Xfuncs.h
+++ b/Xfuncs.h
@@ -44,7 +44,7 @@ void bcopy();
 #define bcmp(b1,b2,len) memcmp(b1, b2, len)
 #   else
 #include string.h
-#if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__)
+#if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || 
defined(__CYGWIN__)
 # include strings.h
 #endif
 #define _XFUNCS_H_INCLUDED_STRING_H
diff --git a/Xos.h b/Xos.h
index 646716b..044d22b 100644
--- a/Xos.h
+++ b/Xos.h
@@ -60,7 +60,7 @@ in this Software without prior written authorization from The 
Open Group.
  */
 
 # include string.h
-# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun)
+# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || 
defined(__CYGWIN__)
 #  include strings.h
 # else
 #  ifndef index
-- 
1.7.5.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: libXaw3d: Changes to 'master'

2011-09-01 Thread Yaakov (Cygwin/X)
On Thu, 2011-09-01 at 10:52 -0700, Gaetan Nadon wrote:
 New commits:
 commit daaa028c111276c3ba4d60b454f0fe39bf10666e
 Author: Gaetan Nadon mems...@videotron.ca
 Date:   Tue Aug 30 22:06:36 2011 -0400
 
 Add missing AC_CONFIG_HEADERS
 
 This is a requirement for all modules.
 www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
 
 Signed-off-by: Gaetan Nadon mems...@videotron.ca

This commit causes a major problem; now none of the AC_DEFINEs (or the
results of AC_CHECK_*) are seen by the source file because none of them
#include config.h.

Either you need to add:

#ifdef HAVE_CONFIG_H
#include config.h
#endif

to the beginning of each source file, or revert commit
daaa028c111276c3ba4d60b454f0fe39bf10666e.  This is a release blocker.


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH libXaw] Remove include directive to X11/Xaw

2011-09-01 Thread Yaakov (Cygwin/X)
On Thu, 2011-09-01 at 19:26 -0400, Gaetan Nadon wrote:
 The -I directive to include/X11/Xaw is removed which will alert
 developers not to include header files with quotes unless they are in
 the /src directory.
 
 Currently no offending includes were found.
 
 Signed-off-by: Gaetan Nadon mems...@videotron.ca

Tested-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


Yaakov
Cygwin/X


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


  1   2   3   4   >