diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-06-01 21:49:51 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-06-01 21:49:51 +0000 |
commit | ddd281e6b9408c786cdc759cf7d1ec8972048658 (patch) | |
tree | 1a89d9415450d874dfdbae0235391a0d67690e87 /src/stubs/stubs.h | |
parent | e9357d6670fc2e8ccf8d8770bac4c31994d6cc2f (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/stubs.h')
-rw-r--r-- | src/stubs/stubs.h | 10 |
1 files changed, 7 insertions, 3 deletions
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, |