On 06/07/2010 22:00, Chris Ball wrote:
On Mon, Jun 28, 2010 at 06:41:10PM +0100, Jon TURNEY wrote:
Since we fix this by removing the serverGeneration symbol, assuming
an external definition will be provided, this means on Windows libXfont
can only be built as a static library (since PE shared libraries cannot
contain undefined symbols).  This produces a libXfont which might only
be useful to the xserver, but the only other user we might care about
is xfs, which is obsolete...

Signed-off-by: Jon TURNEY<jon.turney-grjqepx9rppajuda+fb...@public.gmane.org>

Ping: can we get a fix pushed?  This is still affecting the cygwin build.

I've been waiting for a Reviewed-by: before pushing it.

Looking at my patch again, I seem to have inverted the logic of the test, updated patch attached.
>From 5301750b6f501766161f670293d7d0c0d68f737a Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.tur...@dronecode.org.uk>
Date: Mon, 28 Jun 2010 17:56:07 +0100
Subject: [PATCH] Fix for platforms which don't have weak linkage

Since we fix this by removing the serverGeneration symbol, assuming
an external definition will be provided, this means on Windows libXfont
can only be built as a static library (since PE shared libraries cannot
contain undefined symbols).  This produces a libXfont which might only
be useful to the xserver, but the only other user we might care about
is xfs, which is obsolete...

Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk>
---
 src/stubs/stubs.h   |    1 +
 src/util/miscutil.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/stubs/stubs.h b/src/stubs/stubs.h
index 41cde58..7733dc3 100644
--- a/src/stubs/stubs.h
+++ b/src/stubs/stubs.h
@@ -16,6 +16,7 @@
 #define weak __attribute__((weak))
 #else
 #define weak
+#define NO_WEAK_SYMBOLS
 #endif
 
 extern FontPtr find_old_font ( FSID id );
diff --git a/src/util/miscutil.c b/src/util/miscutil.c
index 1e76b4b..cb43666 100644
--- a/src/util/miscutil.c
+++ b/src/util/miscutil.c
@@ -48,8 +48,10 @@ from The Open Group.
 
 extern void BuiltinRegisterFpeFunctions(void);
 
+#ifndef NO_WEAK_SYMBOLS
 /* make sure everything initializes themselves at least once */
 weak long serverGeneration = 1;
+#endif
 
 weak void
 register_fpe_functions (void)
-- 
1.7.0.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

Reply via email to