On Wed, Nov 14, 2001 at 11:28:08PM +0100, Gustaf Gunnarsson wrote: > I suppose this leaves me to solve the problem by either hacking up the > Xlib (if you cannot compile eg a patched XFree86 Xlib on hpux and > replace the existing one, I am not that keen on coding when it goes > beoynd the basics, maybe that is impossible).
On Wed, Nov 14, 2001 at 02:37:42PM -0800, Mark Vojkovich wrote: > There might be some way to modify or wrap the libX11 binary to > shanghai the XOpenDisplay call and replace the default colormap. > But I'm not very good with those sort of hacker things so I > have no idea how to do that. On Thu, Nov 15, 2001 at 01:12:03AM +0100, Gustaf Gunnarsson wrote: > I actually found X source code wich is supposed to build on hpux now. I > am going to try the approach you suggested first. Thank you very much > again. Gustaf, assuming your application is dynamically linked, you will probably be able to replace /usr/X11R6/lib/libX11.so.5.1 (or the equivalent file for HP/UX) with one that implements your hacked XOpenDisplay. I don't have any experience on HP/UX at this level, but on Solaris it is possible to replace just a subset of functions from a shared library using LD_PRELOAD. For example, I worked around a broken application/system library by replacing getcwd(3) with my own function: /* compile with: * cc -KPIC -B dynamic -G getcwd.c -o getcwd.so.1 * then run * LD_PRELOAD=./getcwd.so.1 netscape */ #include <sys/types.h> #include <stdio.h> #include <errno.h> char *_getcwd(char *, size_t); char *getcwd(char*b, size_t s) { char *r = _getcwd(b, s); while(!r && errno == EINTR) { fprintf(stderr, "getcwd was interrupted, retrying\n"); r = _getcwd(b, s); } return r; } Perhaps the man page for ld.so on HP/UX might help you find out how to do the equivalent operation. HTH, -andy _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert