XGlk 0.4.11 patches for Linux ============================= The xglk library sources (version 0411) do not build gracefully on Linux. The supplied patch file fixes some fatal errors, some compiler warning and a grizzle from gcc about unsafe use of tmpnam(), when linking the library. The changes made were very simple: 1. xglk_loop.c and xglk_msg.c both call gettimeofday() with a dummy non-null second argument. Declarations of the argument fail. Since the argument is dummy, and the function happily accepts NULL for its second argument, the solution was to use NULL instead of &tz and to remove declarations of tz. 2. xglk_scrap.c and xg_style.c needed to declare functions such as strlen(), strcpy(), strcmp() in the former and memcpy() in the latter. 3. xg_fileref.c used tmpnam() to construct a temporary name, and gcc grizzles about this being unsafe when linking the library into an executable. Cured by replacing tmpnam() with a call to sprintf() using getpid() and getppid() to create a unique name. (Let's not be *too* paranoic about NFS-mounts! :-) Mike Arnautov, 18 Mar 2003