summaryrefslogtreecommitdiff
path: root/src/stubs
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/stubs
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/stubs')
-rw-r--r--src/stubs/cauthgen.c6
-rw-r--r--src/stubs/csignal.c6
-rw-r--r--src/stubs/delfntcid.c6
-rw-r--r--src/stubs/errorf.c6
-rw-r--r--src/stubs/fatalerror.c6
-rw-r--r--src/stubs/findoldfnt.c6
-rw-r--r--src/stubs/getcres.c6
-rw-r--r--src/stubs/getdefptsize.c6
-rw-r--r--src/stubs/getnewfntcid.c6
-rw-r--r--src/stubs/gettime.c6
-rw-r--r--src/stubs/initfshdl.c6
-rw-r--r--src/stubs/regfpefunc.c6
-rw-r--r--src/stubs/rmfshdl.c6
-rw-r--r--src/stubs/servclient.c7
-rw-r--r--src/stubs/setfntauth.c6
-rw-r--r--src/stubs/stfntcfnt.c6
-rw-r--r--src/stubs/stubs.h10
-rw-r--r--src/stubs/xpstubs.c12
18 files changed, 29 insertions, 90 deletions
diff --git a/src/stubs/cauthgen.c b/src/stubs/cauthgen.c
index dec438d..06f1a34 100644
--- a/src/stubs/cauthgen.c
+++ b/src/stubs/cauthgen.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
client_auth_generation(ClientPtr client)
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/csignal.c b/src/stubs/csignal.c
index c957eb8..3e102cc 100644
--- a/src/stubs/csignal.c
+++ b/src/stubs/csignal.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-Bool
+weak Bool
ClientSignal(ClientPtr client)
{
return True;
}
-
-/* end of file */
diff --git a/src/stubs/delfntcid.c b/src/stubs/delfntcid.c
index af5c0a8..0b0a747 100644
--- a/src/stubs/delfntcid.c
+++ b/src/stubs/delfntcid.c
@@ -1,13 +1,9 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-void
+weak void
DeleteFontClientID(Font id)
{
}
-
-/* end of file */
diff --git a/src/stubs/errorf.c b/src/stubs/errorf.c
index 52c6042..28872e2 100644
--- a/src/stubs/errorf.c
+++ b/src/stubs/errorf.c
@@ -1,13 +1,9 @@
-/* $XFree86: xc/lib/font/stubs/errorf.c,v 1.1 1999/01/11 05:13:19 dawes Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-void
+weak void
ErrorF(const char *f, ...)
{
}
-
-/* end of file */
diff --git a/src/stubs/fatalerror.c b/src/stubs/fatalerror.c
index 7dff170..295593e 100644
--- a/src/stubs/fatalerror.c
+++ b/src/stubs/fatalerror.c
@@ -1,13 +1,9 @@
-/* $XFree86: xc/lib/font/stubs/fatalerror.c,v 1.1 1999/01/11 05:13:19 dawes Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-void
+weak void
FatalError(const char *f, ...)
{
}
-
-/* end of file */
diff --git a/src/stubs/findoldfnt.c b/src/stubs/findoldfnt.c
index 218ecd4..22bd8c1 100644
--- a/src/stubs/findoldfnt.c
+++ b/src/stubs/findoldfnt.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-FontPtr
+weak FontPtr
find_old_font(FSID id)
{
return (FontPtr)NULL;
}
-
-/* end of file */
diff --git a/src/stubs/getcres.c b/src/stubs/getcres.c
index da0de91..b564f24 100644
--- a/src/stubs/getcres.c
+++ b/src/stubs/getcres.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-FontResolutionPtr
+weak FontResolutionPtr
GetClientResolutions(int *num)
{
return (FontResolutionPtr) 0;
}
-
-/* end of file */
diff --git a/src/stubs/getdefptsize.c b/src/stubs/getdefptsize.c
index 10a46c8..11804dd 100644
--- a/src/stubs/getdefptsize.c
+++ b/src/stubs/getdefptsize.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
GetDefaultPointSize(void)
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/getnewfntcid.c b/src/stubs/getnewfntcid.c
index 5a1e927..aefc553 100644
--- a/src/stubs/getnewfntcid.c
+++ b/src/stubs/getnewfntcid.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-Font
+weak Font
GetNewFontClientID(void)
{
return (Font)0;
}
-
-/* end of file */
diff --git a/src/stubs/gettime.c b/src/stubs/gettime.c
index 60a4e39..1aca1cc 100644
--- a/src/stubs/gettime.c
+++ b/src/stubs/gettime.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-unsigned long
+weak unsigned long
GetTimeInMillis (void)
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/initfshdl.c b/src/stubs/initfshdl.c
index 15a337a..faee9f6 100644
--- a/src/stubs/initfshdl.c
+++ b/src/stubs/initfshdl.c
@@ -1,15 +1,11 @@
-/* $XFree86: xc/lib/font/stubs/initfshdl.c,v 1.1 1999/01/11 05:13:20 dawes Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
init_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler)
{
return Successful;
}
-
-/* end of file */
diff --git a/src/stubs/regfpefunc.c b/src/stubs/regfpefunc.c
index d6fcf3b..67e43b3 100644
--- a/src/stubs/regfpefunc.c
+++ b/src/stubs/regfpefunc.c
@@ -1,11 +1,9 @@
-/* $XFree86: xc/lib/font/stubs/regfpefunc.c,v 1.1 1999/01/11 05:13:20 dawes Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
RegisterFPEFunctions(NameCheckFunc name_func,
InitFpeFunc init_func,
FreeFpeFunc free_func,
@@ -24,5 +22,3 @@ RegisterFPEFunctions(NameCheckFunc name_func,
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/rmfshdl.c b/src/stubs/rmfshdl.c
index ae0ab78..1f87744 100644
--- a/src/stubs/rmfshdl.c
+++ b/src/stubs/rmfshdl.c
@@ -1,15 +1,11 @@
-/* $XFree86: xc/lib/font/stubs/rmfshdl.c,v 1.1 1999/01/11 05:13:21 dawes Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-void
+weak void
remove_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr blockHandler,
Bool all)
{
}
-
-/* end of file */
diff --git a/src/stubs/servclient.c b/src/stubs/servclient.c
index 25c853f..ae51621 100644
--- a/src/stubs/servclient.c
+++ b/src/stubs/servclient.c
@@ -1,3 +1,6 @@
-/* $XFree86$ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "stubs.h"
-void *serverClient = 0;
+weak void *serverClient = 0;
diff --git a/src/stubs/setfntauth.c b/src/stubs/setfntauth.c
index 843f155..01d18b1 100644
--- a/src/stubs/setfntauth.c
+++ b/src/stubs/setfntauth.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
set_font_authorizations(char **authorizations, int *authlen, ClientPtr client)
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/stfntcfnt.c b/src/stubs/stfntcfnt.c
index c062677..bf88505 100644
--- a/src/stubs/stfntcfnt.c
+++ b/src/stubs/stfntcfnt.c
@@ -1,14 +1,10 @@
-/* $XFree86$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-int
+weak int
StoreFontClientFont(FontPtr pfont, Font id)
{
return 0;
}
-
-/* end of file */
diff --git a/src/stubs/stubs.h b/src/stubs/stubs.h
index d687a77..41cde58 100644
--- a/src/stubs/stubs.h
+++ b/src/stubs/stubs.h
@@ -1,12 +1,9 @@
/* $XFree86: xc/lib/font/stubs/stubs.h,v 1.3 1999/12/15 01:14:36 robin Exp $ */
-/* This directory includes dummy entry for bdftopcf and mkfontdir */
-
#include <stdio.h>
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/font.h>
-
#ifndef True
#define True (-1)
#endif
@@ -14,6 +11,13 @@
#define False (0)
#endif
+/* this probably works for Mach-O too, but probably not for PE */
+#if defined(__ELF__) && defined(__GNUC__) && (__GNUC__ >= 3)
+#define weak __attribute__((weak))
+#else
+#define weak
+#endif
+
extern FontPtr find_old_font ( FSID id );
extern int set_font_authorizations ( char **authorizations,
int *authlen,
diff --git a/src/stubs/xpstubs.c b/src/stubs/xpstubs.c
index 4449153..cb5d76d 100644
--- a/src/stubs/xpstubs.c
+++ b/src/stubs/xpstubs.c
@@ -1,24 +1,16 @@
-/* $XFree86$ */
-
-/*
- stub for XpClient* functions.
-*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "stubs.h"
-Bool
+weak Bool
XpClientIsBitmapClient(ClientPtr client)
{
return True;
}
-Bool
+weak Bool
XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe)
{
return False;
}
-
-/* end of file */