These are patches to compile the X-desktop manager V2.4.8 under Linux. Get the source itself from export.lcs.mit.edu. diff -cr xdtm/Ext/iconman.c xdtm-linux/Ext/iconman.c *** xdtm/Ext/iconman.c Mon Mar 29 17:02:46 1993 --- xdtm-linux/Ext/iconman.c Tue Mar 30 21:44:38 1993 *************** *** 164,170 **** */ #if NeedFunctionPrototypes ! extern int execute(String, String, String, Boolean, ApProgram *); extern void setCursor(Cursor); #else extern int execute(); --- 164,170 ---- */ #if NeedFunctionPrototypes ! extern int execute(String, String, String, Boolean, AppProgram *); extern void setCursor(Cursor); #else extern int execute(); diff -cr xdtm/Imakefile xdtm-linux/Imakefile *** xdtm/Imakefile Mon Mar 29 17:17:39 1993 --- xdtm-linux/Imakefile Tue Mar 30 22:03:12 1993 *************** *** 76,82 **** --- 76,84 ---- /**/# file to spaces. (use the expand(1) utility) /**/# + #ifndef LinuxArchitecture PROTO_DEFINES = + #endif # PROTO_DEFINES = -DNeedFunctionPrototypes -DNeedWidePrototypes /* SunOS defines (Comment LOCAL_LDFLAGS out if you want dynamic linking) */ *************** *** 88,93 **** --- 90,102 ---- EXTRA_LIBRARIES = -Bdynamic -ldl #endif + /* Linux modifications */ + #ifdef LinuxArchitecture + #define BISON + #define FLEX + XDTMOPTIONS = -DHAS_STRSTR -DECHO_N + #endif + /* AIX defines (Comment LOCAL_LDFLAGS out if you want dynamic linking) */ #ifdef RsArchitecture XDTMOPTIONS = -DHAS_STRSTR -DECHO_N *************** *** 122,128 **** --- 131,139 ---- CC = cc -I. -I.. $(XDTMOPTIONS) Install_defines + #ifndef LinuxArchitecture CDEBUGFLAGS = -O /* put -g or -O here. */ + #endif /* IBM AIX TO FIX A COMPILER BUG WHEN -O IS SET*/ #ifdef RsArchitecture Only in xdtm: Makefile Only in xdtm-linux: Makefile.bak Only in xdtm-linux: Xdtm.ad diff -cr xdtm/appman.c xdtm-linux/appman.c *** xdtm/appman.c Mon Mar 29 17:02:21 1993 --- xdtm-linux/appman.c Tue Mar 30 22:13:57 1993 *************** *** 53,58 **** --- 53,63 ---- #include /* For access(2) */ #endif + #ifdef linux + #define FAPPEND O_APPEND + #define FNDELAY O_NDELAY + #endif + #include #include "menus.h" /* For the use of Trash, Copy, and Move */ #include "parse.h" /* For access to AppSelection */ *************** *** 1468,1474 **** dup2(slave, 2); if (slave > 2) close(slave); ! fcntl(1, F_SETFL, FAPPEND); setbuf(stdout, NULL); /* --- 1473,1479 ---- dup2(slave, 2); if (slave > 2) close(slave); ! fcntl(1, F_SETFL, O_APPEND); setbuf(stdout, NULL); /* *************** *** 1476,1482 **** --- 1481,1491 ---- * so we can change the group of the terminal. */ ioctl(0, TIOCGPGRP, &pgrp); + #ifndef linux setpgrp(0, pgrp); + #else + setpgrp(); + #endif /* * Now set the process group of the terminal and of us *************** *** 1486,1492 **** pid = getpid(); ioctl(0, TIOCSPGRP, &pid); ! setpgrp(0, pid); } else { --- 1495,1505 ---- pid = getpid(); ioctl(0, TIOCSPGRP, &pid); ! #ifndef linux ! setpgrp(0, pgrp); ! #else ! setpgrp(); ! #endif } else { *************** *** 1556,1562 **** */ close(slave); ! fcntl(master, F_SETFL, FNDELAY); processfp = fdopen(master, "r+"); #ifdef hpux setvbuf(processfp, NULL, _IOLBF, BUFSIZ); --- 1569,1575 ---- */ close(slave); ! fcntl(master, F_SETFL, O_NDELAY); processfp = fdopen(master, "r+"); #ifdef hpux setvbuf(processfp, NULL, _IOLBF, BUFSIZ); diff -cr xdtm/doubleclick.c xdtm-linux/doubleclick.c *** xdtm/doubleclick.c Mon Mar 29 17:02:23 1993 --- xdtm-linux/doubleclick.c Tue Mar 30 22:04:21 1993 *************** *** 2422,2428 **** alert_dialog("No space to create file", NULL, NULL); break; ! #ifndef TRUE_SYSV case EDQUOT: alert_dialog("Quota over limit", NULL, NULL); break; --- 2422,2428 ---- alert_dialog("No space to create file", NULL, NULL); break; ! #ifdef EDQUOT case EDQUOT: alert_dialog("Quota over limit", NULL, NULL); break; diff -cr xdtm/lexical.l xdtm-linux/lexical.l *** xdtm/lexical.l Mon Mar 29 17:02:24 1993 --- xdtm-linux/lexical.l Tue Mar 30 22:07:01 1993 *************** *** 15,26 **** * * 20-04-92 Edward Groenendaal - I had the same problem on a Sun (SunOS4.1.1) * with X11R4, I therefore am going to undef _XUTIL_H_ for ALL machines. */ ! /* #ifdef macII */ #ifndef _XUTIL_H_ #define _XUTIL_H_ #endif ! /* #endif */ #include "xdtm.h" #include "parse.h" --- 15,34 ---- * * 20-04-92 Edward Groenendaal - I had the same problem on a Sun (SunOS4.1.1) * with X11R4, I therefore am going to undef _XUTIL_H_ for ALL machines. + * + * 93-03-30 Rob Hooft - But now the code doesn't compile nicely on Linux + * machines. I'll put it back. */ ! #ifdef macII #ifndef _XUTIL_H_ #define _XUTIL_H_ #endif ! #endif ! #ifdef sun ! #ifndef _XUTIL_H_ ! #define _XUTIL_H_ ! #endif ! #endif #include "xdtm.h" #include "parse.h" diff -cr xdtm/menus.c xdtm-linux/menus.c *** xdtm/menus.c Mon Mar 29 17:02:25 1993 --- xdtm-linux/menus.c Tue Mar 30 22:08:13 1993 *************** *** 17,24 **** --- 17,28 ---- #include "menus.h" #include "parse.h" /* Get type for process_list */ #ifndef SYSV + #ifdef linux + #include + #else #include /* needed for R_OK on some systems.. apparently :-) */ #endif + #endif #include #include "Ext/os.h" /* for R_OK if needed ! */ #include diff -cr xdtm/xdtm.h xdtm-linux/xdtm.h *** xdtm/xdtm.h Mon Mar 29 17:02:28 1993 --- xdtm-linux/xdtm.h Tue Mar 30 22:09:22 1993 *************** *** 57,62 **** --- 57,65 ---- #ifdef SVR4_0 #include #endif + #ifdef linux + #include + #endif /* Standard X11 include files */ #include