summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-06-01 21:49:51 +0000
committerAdam Jackson <ajax@nwnk.net>2006-06-01 21:49:51 +0000
commitddd281e6b9408c786cdc759cf7d1ec8972048658 (patch)
tree1a89d9415450d874dfdbae0235391a0d67690e87 /src/util
parente9357d6670fc2e8ccf8d8770bac4c31994d6cc2f (diff)
For the 20-odd symbols defined both in libXfont and the X server, emit them
as weak symbols so that the linker will prefer the server's definition when present.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Makefile.am3
-rw-r--r--src/util/atom.c7
-rw-r--r--src/util/miscutil.c16
3 files changed, 14 insertions, 12 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index f9010d6..bec93ee 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -1,5 +1,6 @@
INCLUDES = \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I$(top_srcdir)/src/stubs
noinst_LTLIBRARIES = libutil.la
diff --git a/src/util/atom.c b/src/util/atom.c
index 942ea0d..e5fea46 100644
--- a/src/util/atom.c
+++ b/src/util/atom.c
@@ -37,6 +37,7 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
#include <X11/fonts/fontmisc.h>
+#include "stubs.h"
typedef struct _AtomList {
char *name;
@@ -145,7 +146,7 @@ NameEqual (const char *a, const char *b, int l)
return TRUE;
}
-Atom
+weak Atom
MakeAtom(char *string, unsigned len, int makeit)
{
AtomListPtr a;
@@ -218,13 +219,13 @@ MakeAtom(char *string, unsigned len, int makeit)
return a->atom;
}
-int
+weak int
ValidAtom(Atom atom)
{
return (atom != None) && (atom <= lastAtom);
}
-char *
+weak char *
NameForAtom(Atom atom)
{
if (atom != None && atom <= lastAtom)
diff --git a/src/util/miscutil.c b/src/util/miscutil.c
index 03b4d06..611f912 100644
--- a/src/util/miscutil.c
+++ b/src/util/miscutil.c
@@ -35,22 +35,22 @@ from The Open Group.
#include <X11/Xosdefs.h>
#include <stdlib.h>
#include <X11/fonts/fontmisc.h>
+#include "stubs.h"
#define XK_LATIN1
#include <X11/keysymdef.h>
-/* #include <X11/Xmu/CharSet.h> */
/* make sure everything initializes themselves at least once */
-long serverGeneration = 1;
+weak long serverGeneration = 1;
-void *
+weak void *
Xalloc (unsigned long m)
{
return malloc (m);
}
-void *
+weak void *
Xrealloc (void *n, unsigned long m)
{
if (!n)
@@ -59,20 +59,20 @@ Xrealloc (void *n, unsigned long m)
return realloc (n, m);
}
-void
+weak void
Xfree (void *n)
{
if (n)
free (n);
}
-void *
+weak void *
Xcalloc (unsigned long n)
{
return calloc (n, 1);
}
-void
+weak void
CopyISOLatin1Lowered (char *dst, char *src, int len)
{
register unsigned char *dest, *source;
@@ -93,7 +93,7 @@ CopyISOLatin1Lowered (char *dst, char *src, int len)
*dest = '\0';
}
-void
+weak void
register_fpe_functions ()
{
}