aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/stubs/stubs.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-25 15:37:13 +0000
committermarha <marha@users.sourceforge.net>2011-03-25 15:37:13 +0000
commit41a502478a2972358dec934d82ee401c61a5cd36 (patch)
tree3fda8100e6da9b4a2863789e393016a750502067 /libXfont/src/stubs/stubs.h
parent81aeaf653a832c4054d9a40b1cc796911521a739 (diff)
parent272e57235cd60a2e65ac8258d96a02eb3939b687 (diff)
downloadvcxsrv-41a502478a2972358dec934d82ee401c61a5cd36.tar.gz
vcxsrv-41a502478a2972358dec934d82ee401c61a5cd36.tar.bz2
vcxsrv-41a502478a2972358dec934d82ee401c61a5cd36.zip
svn merge ^/branches/released .
Diffstat (limited to 'libXfont/src/stubs/stubs.h')
-rw-r--r--libXfont/src/stubs/stubs.h72
1 files changed, 41 insertions, 31 deletions
diff --git a/libXfont/src/stubs/stubs.h b/libXfont/src/stubs/stubs.h
index 41cde58df..ce3aeb158 100644
--- a/libXfont/src/stubs/stubs.h
+++ b/libXfont/src/stubs/stubs.h
@@ -1,31 +1,41 @@
-/* $XFree86: xc/lib/font/stubs/stubs.h,v 1.3 1999/12/15 01:14:36 robin Exp $ */
-
-#include <stdio.h>
-#include <X11/fonts/fntfilst.h>
-#include <X11/fonts/font.h>
-
-#ifndef True
-#define True (-1)
-#endif
-#ifndef False
-#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,
- ClientPtr client );
-
-extern unsigned long GetTimeInMillis (void);
-
-extern void ErrorF(const char *format, ...);
-extern void FatalError(const char *format, ...);
-
-/* end of file */
+#include <stdio.h>
+#include <X11/fonts/fntfilst.h>
+#include <X11/fonts/font.h>
+
+#ifndef True
+#define True (-1)
+#endif
+#ifndef False
+#define False (0)
+#endif
+
+/* this probably works for Mach-O too, but probably not for PE */
+#if (defined(__APPLE__) || defined(__ELF__)) && defined(__GNUC__) && (__GNUC__ >= 3)
+#define weak __attribute__((weak))
+#else
+#define weak
+#ifndef __SUNPRO_C /* Sun compilers use #pragma weak in .c files instead */
+#define NO_WEAK_SYMBOLS
+#endif
+#endif
+
+/* This is really just a hack for now... __APPLE__ really should be using
+ * the weak symbols route above, but it's causing an as-yet unresolved issue,
+ * so we're instead building with flat_namespace.
+ */
+#ifdef __APPLE__
+#undef weak
+#define weak
+#endif
+
+extern FontPtr find_old_font ( FSID id );
+extern int set_font_authorizations ( char **authorizations,
+ int *authlen,
+ ClientPtr client );
+
+extern unsigned long GetTimeInMillis (void);
+
+extern void ErrorF(const char *format, ...);
+extern void FatalError(const char *format, ...);
+
+/* end of file */