diff options
-rw-r--r-- | include/X11/IntrinsicP.h | 7 | ||||
-rw-r--r-- | src/Initialize.c | 9 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/include/X11/IntrinsicP.h b/include/X11/IntrinsicP.h index bb6570b..f2ded6f 100644 --- a/include/X11/IntrinsicP.h +++ b/include/X11/IntrinsicP.h @@ -266,7 +266,12 @@ extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */ Widget /* object */ ); -extern void _XtInherit( +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(LIBXT_COMPILATION) +__declspec(dllimport) +#else +extern +#endif +void _XtInherit( void ); diff --git a/src/Initialize.c b/src/Initialize.c index 9783deb..61c8575 100644 --- a/src/Initialize.c +++ b/src/Initialize.c @@ -245,11 +245,20 @@ void _XtInherit(void) * cygwin-xfree: http://www.cygwin.com/ml/cygwin-xfree/2003-10/msg00000.html */ +#ifdef __x86_64__ +asm (".section .trampoline, \"dwx\" \n\ + .globl _XtInherit \n\ + _XtInherit: \n\ + jmp *_y(%rip) \n\ +_y: .quad __XtInherit \n\ + .text \n"); +#else asm (".data\n\ .globl __XtInherit \n\ __XtInherit: jmp *_y \n\ _y: .long ___XtInherit \n\ .text \n"); +#endif #define _XtInherit __XtInherit #endif diff --git a/src/Makefile.am b/src/Makefile.am index 8c1a664..7f8ba6d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ SRCH_DEFINES = -DXFILESEARCHPATHDEFAULT=\"$(XFILESEARCHPATHDEFAULT)\" ERRORDB_DEFINES = -DERRORDB=\"$(ERRORDBDIR)/XtErrorDB\" AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \ - $(XTMALLOC_ZERO_CFLAGS) + $(XTMALLOC_ZERO_CFLAGS) -DLIBXT_COMPILATION AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/include/X11 \ -I$(top_builddir)/include -I$(top_builddir)/include/X11 |