roell@informatik.tu-muenchen.dbp.de (Thomas Roell) (11/15/90)
For everybody who wants to use epoch 3.2 with the X11R4 port made by the great Thomas Roell, here are the diffs to start with. I did not test everything, but everything I normally use runs fine. ------------------------------ cut -------------------------------------------- *** .orig/Makefile Tue Nov 13 23:08:04 1990 --- /proj/epoch-3.2/src/Makefile Tue Nov 13 21:50:14 1990 *************** *** 1,4 **** ! CC = cc CPP = $(CC) -E MAKE = make # BSD doesn't have it as a default. #Note: an alternative is CPP = /lib/cpp --- 1,4 ---- ! CC = gcc CPP = $(CC) -E MAKE = make # BSD doesn't have it as a default. #Note: an alternative is CPP = /lib/cpp *** .orig/config.h Tue Nov 13 21:42:10 1990 --- /proj/epoch-3.2/src/config.h Tue Nov 13 21:43:54 1990 *************** *** 0 **** --- 1,166 ---- + /* GNU Emacs site configuration template file. + Copyright (C) 1988 Free Software Foundation, Inc. + + This file is part of GNU Emacs. + + GNU Emacs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY. No author or distributor + accepts responsibility to anyone for the consequences of using it + or for whether it serves any particular purpose or works at all, + unless he says so in writing. Refer to the GNU Emacs General Public + License for full details. + + Everyone is granted permission to copy, modify and redistribute + GNU Emacs, but only under the conditions described in the + GNU Emacs General Public License. A copy of this license is + supposed to have been given to you along with GNU Emacs so you + can know your rights and responsibilities. It should be in a + file named COPYING. Among other things, the copyright notice + and this notice must be preserved on all copies. */ + + + /* Include here a s- file that describes the system type you are using. + See the file ../etc/MACHINES for a list of systems and + the names of the s- files to use for them. + See s-template.h for documentation on writing s- files. */ + #include "s-usg5-3.h" + + /* Include here a m- file that describes the machine and system you use. + See the file ../etc/MACHINES for a list of machines and + the names of the m- files to use for them. + See m-template.h for info on what m- files should define. + */ + #include "m-isc.h" + + /* Load in the conversion definitions if this system + needs them and the source file being compiled has not + said to inhibit this. There should be no need for you + to alter these lines. */ + + #ifdef SHORTNAMES + #ifndef NO_SHORTNAMES + #include "../shortnames/remap.h" + #endif /* not NO_SHORTNAMES */ + #endif /* SHORTNAMES */ + + /* Define HAVE_X_WINDOWS if you want to use the X window system. */ + + #define HAVE_X_WINDOWS + + /* Define X11 if you want to use version 11 of X windows. + Otherwise, Emacs expects to use version 10. */ + + #define X11 + + /* Define HAVE_X_MENU if you want to use the X window menu system. + This appears to work on some machines that support X + and not on others. */ + + /* #define HAVE_X_MENU */ + + /* Define `subprocesses' should be defined if you want to + have code for asynchronous subprocesses + (as used in M-x compile and M-x shell). + These do not work for some USG systems yet; + for the ones where they work, the s-*.h file defines this flag. */ + + #ifndef VMS + #ifndef USG + #define subprocesses + #endif + #endif + + /* Define USER_FULL_NAME to return a string + that is the user's full name. + It can assume that the variable `pw' + points to the password file entry for this user. + + At some sites, the pw_gecos field contains + the user's full name. If neither this nor any other + field contains the right thing, use pw_name, + giving the user's login name, since that is better than nothing. */ + + #define USER_FULL_NAME pw->pw_gecos + + /* Define AMPERSAND_FULL_NAME if you use the convention + that & in the full name stands for the login id. */ + + /* #define AMPERSAND_FULL_NAME */ + + /* Maximum screen width we handle. */ + + #define MScreenWidth 300 + + /* Maximum screen length we handle. */ + + #define MScreenLength 300 + + /* # bytes of pure Lisp code to leave space for. + Note that s-vms.h and m-sun2.h may override this default. */ + + #ifndef PURESIZE + #ifdef HAVE_X_WINDOWS + #define PURESIZE 200000 + #else + #define PURESIZE 118000 + #endif + #endif + + /* Define HIGHPRI as a negative number + if you want Emacs to run at a higher than normal priority. + For this to take effect, you must install Emacs with setuid root. + Emacs will change back to the users's own uid after setting + its priority. */ + + /* #define HIGHPRI */ + + /* These are fixes to the gap moving code. The normal setup is to use while + * loops to move the gap. bcopy() can't be used normally because the regions + * might overlap. The following control this. If 0, then a while loop is used. + * non-0 indicates that bcopy() should be used. RIGHT_OVERLAP means that + * _target_ area overlaps the _source_ area on the right of the _source_, + * i.e. _target_ > _source_. LEFT_OVERLAP is the opposite, the _target_ + * overlaps the _source_ on the left, _source_ > _target_. + */ + #ifndef SAFE_BCOPY_RIGHT_OVERLAP + #define SAFE_BCOPY_RIGHT_OVERLAP 0 + #endif + #ifndef SAFE_BCOPY_LEFT_OVERLAP + #define SAFE_BCOPY_LEFT_OVERLAP 0 + #endif + + /* for those systems that don't support void *'s, change void to char */ + #define VOID void + + /* define DENYS_ALARM if you want timer events. they are implemented + * by sharing the real timer with emacs. see alarm.c. + */ + + /* #define DENYS_ALARM */ + + /* define DENYS_MOTION_COMPRESSION if you want code that implements + * motion events compression. nobody knows yet if this is useful. + */ + + /* #define DENYS_MOTION_COMPRESSION */ + + /* define ALL_MOTIONS to receive motion events whenever they occur. + * otherwise, you will only receive motion events while a button is + * pressed. + */ + + /* #define ALL_MOTIONS */ + + /* + * define HAVE_LEIF if you wish to use epoch with the Leif package, or + * with to use the before and after-change hooks. + */ + + /* #define HAVE_LEIF */ + + /* + * define X_COMPOSE if you wish to utilize X support for Compose strings. + * This is enabled in sun-os4.h + */ + + /* #define X_COMPOSE */ *** .orig/dispepoch.c Tue Nov 13 23:37:47 1990 --- /proj/epoch-3.2/src/dispepoch.c Tue Nov 13 23:38:16 1990 *************** *** 25,34 **** --- 25,36 ---- #include <stdio.h> #ifdef HAVE_TIMEVAL + #ifndef SYSV386 #ifdef HPUX #include <time.h> #else #include <sys/time.h> + #endif #endif #endif *** .orig/fileio.c Tue Nov 13 23:12:19 1990 --- /proj/epoch-3.2/src/fileio.c Tue Nov 13 23:19:59 1990 *************** *** 22,60 **** * Includes local changes to support Leif. */ ! #include <sys/types.h> ! #include <sys/stat.h> ! #include <pwd.h> ! #include <ctype.h> ! #include <sys/dir.h> ! #include <errno.h> ! ! #ifndef VMS ! #ifndef HAVE_STRERROR ! extern int errno; ! extern char *sys_errlist[]; ! extern int sys_nerr; ! ! #else /* HAVE_STRERROR */ ! extern char *strerror (); ! #endif /* HAVE_STRERROR */ ! #endif /* VMS */ ! ! #ifdef APOLLO ! #include <sys/time.h> ! #endif ! #ifdef NULL ! #undef NULL #endif - #include "config.h" - #include "lisp.h" - #include "buffer.h" - #include "window.h" #ifdef DGUX #include <signal.h> #ifdef SIGIO #ifdef POSIX_SIGNAL extern sigset_t zero_sigmask; --- 22,37 ---- * Includes local changes to support Leif. */ ! #include "config.h" ! #ifndef SYSV386 ! #include <sys/types.h> #endif #ifdef DGUX #include <signal.h> #ifdef SIGIO + #ifdef POSIX_SIGNAL extern sigset_t zero_sigmask; *************** *** 86,92 **** --- 63,95 ---- #endif /* DGUX */ + #include <sys/stat.h> + #include <pwd.h> + #include <ctype.h> + #include <sys/dir.h> + #include <errno.h> + + #ifndef VMS + #ifndef HAVE_STRERROR + extern int errno; + extern char *sys_errlist[]; + extern int sys_nerr; + + #else /* HAVE_STRERROR */ + extern char *strerror (); + #endif /* HAVE_STRERROR */ + #endif /* VMS */ + + #ifdef APOLLO + #include <sys/time.h> + #endif + #ifdef NULL + #undef NULL + #endif + #include "lisp.h" + #include "buffer.h" + #include "window.h" #ifdef VMS #include <perror.h> *************** *** 97,106 **** --- 100,111 ---- #endif #ifdef HAVE_TIMEVAL + #ifndef SYSV386 #ifdef HPUX #include <time.h> #else #include <sys/time.h> + #endif #endif #endif *** .orig/m-isc.h Tue Nov 13 21:44:50 1990 --- /proj/epoch-3.2/src/m-isc.h Wed Nov 14 00:01:29 1990 *************** *** 0 **** --- 1,32 ---- + /* m- file for Integrated Solutions 386 machine. */ + + #include "m-intel386.h" + + #undef LIBX10_SYSTEM + #undef LIBX11_SYSTEM + #define LIBX10_SYSTEM -lpt + #define LIBX11_SYSTEM -lpt + + #undef HAVE_SOCKETS + + #define HAVE_SELECT + + #define HAVE_TIMEVAL + #define HAVE_GETTIMEOFDAY + #define USE_UTIME + + #define HAVE_PTYS + #define SYSV_PTYS + #define USE_STREAMS + + #undef LIB_STANDARD + #define LIB_STANDARD /usr/local/lib/gcc-gnulib -lc + + #define C_SWITCH_MACHINE -DSYSV -DSYSV386 -DISC + #define C_DEBUG_SWITCH -O -fwritable-strings -fpcc-struct-return + + #define MAXHOSTNAMELEN 1024 + #define HAVE_ALLOCA + #define BSTRING + #define alloca __builtin_alloca + /* #define select __select */ *** .orig/mouse.c Tue Nov 13 23:03:54 1990 --- /proj/epoch-3.2/src/mouse.c Tue Nov 13 23:04:13 1990 *************** *** 32,37 **** --- 32,38 ---- #include "x11term.h" #include "dispextern.h" #include "termchar.h" + #ifndef SYSV386 #ifdef USG #include <time.h> #else *************** *** 38,43 **** --- 39,45 ---- #include <sys/time.h> #endif #include <fcntl.h> + #endif #include <setjmp.h> #include "screen.h" *** .orig/process.c Tue Nov 13 23:25:25 1990 --- /proj/epoch-3.2/src/process.c Tue Nov 13 23:37:11 1990 *************** *** 29,34 **** --- 29,44 ---- #include <stdio.h> #include <errno.h> #include <setjmp.h> + + #ifdef SYSV386 + #include <X11/Xos.h> + #include <sys/stat.h> + #include <termio.h> + #include <sys/stream.h> + #include <sys/tty.h> + #include <sys/ptem.h> /* Necessary for struct winsize */ + #else /* not SYSV386 */ + #include <sys/types.h> /* some typedefs are used in sys/file.h */ #include <sys/file.h> #include <sys/stat.h> *************** *** 87,92 **** --- 97,104 ---- #endif #include <sys/pty.h> #endif + + #endif /* SYSV386 */ #undef NULL #include "lisp.h" *** .orig/property.c Tue Nov 13 23:09:00 1990 --- /proj/epoch-3.2/src/property.c Tue Nov 13 23:09:24 1990 *************** *** 3,9 **** #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #ifndef makedev #include <sys/types.h> #endif #include <memory.h> --- 3,9 ---- #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif #include <memory.h> *** .orig/screen.c Tue Nov 13 23:02:18 1990 --- /proj/epoch-3.2/src/screen.c Tue Nov 13 23:02:44 1990 *************** *** 26,32 **** #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #ifndef makedev #include <sys/types.h> #endif --- 26,32 ---- #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif *** .orig/sysdep.c Tue Nov 13 21:51:06 1990 --- /proj/epoch-3.2/src/sysdep.c Tue Nov 13 23:50:35 1990 *************** *** 58,64 **** --- 58,77 ---- #endif /* `open' is a macro */ #include <stdio.h> + #ifdef SYSV386 + #include <X11/Xos.h> + #else #include <sys/types.h> + #ifndef BSD4_1 + #ifdef BSD /* this is done this way to avoid defined(BSD) || defined (USG) + because the vms compiler doesn't grok `defined' */ + #include <fcntl.h> + #endif + #ifdef USG + #include <fcntl.h> + #endif + #endif /* not 4.1 bsd */ + #endif #include <sys/stat.h> #include <errno.h> *************** *** 94,109 **** #define MAXIOSIZE ( 32 * PAGESIZE ) /* Don't I/O more than 32 blocks at a time */ #endif /* VMS */ - #ifndef BSD4_1 - #ifdef BSD /* this is done this way to avoid defined(BSD) || defined (USG) - because the vms compiler doesn't grok `defined' */ - #include <fcntl.h> - #endif - #ifdef USG - #include <fcntl.h> - #endif - #endif /* not 4.1 bsd */ - #ifdef BSD #include <sys/ioctl.h> #ifdef BSD4_1 --- 107,112 ---- *************** *** 145,151 **** #define TABS_OK(str) ((str.c_oflag & TABDLY) != TAB3) #endif /* HAVE_TERMIO */ ! #ifdef XENIX #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ #endif --- 148,154 ---- #define TABS_OK(str) ((str.c_oflag & TABDLY) != TAB3) #endif /* HAVE_TERMIO */ ! #if (defined XENIX) || (defined SYSV386) #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ #endif *************** *** 179,189 **** --- 182,194 ---- #endif #endif #ifdef HAVE_TIMEVAL + #ifndef SYSV386 #ifdef HPUX #include <time.h> #else #include <sys/time.h> #endif + #endif #endif /* HAVE_TIMEVAL */ #endif /* USG */ *************** *** 1930,1936 **** } #endif /* BSD4_1 */ ! #ifdef USG /* * The BSD random(3) returns numbers in the range of * 0 to 2e31 - 1. The USG rand(3C) returns numbers in the --- 1935,1941 ---- } #endif /* BSD4_1 */ ! #if (defined USG) && !(defined SYSV386) /* * The BSD random(3) returns numbers in the range of * 0 to 2e31 - 1. The USG rand(3C) returns numbers in the *** .orig/x11fns.c Tue Nov 13 22:39:06 1990 --- /proj/epoch-3.2/src/x11fns.c Tue Nov 13 22:39:56 1990 *************** *** 33,38 **** --- 33,39 ---- #include "x11term.h" #include "dispextern.h" #include "termchar.h" + #ifndef SYSV386 #if defined(USG) && ! defined(OS_386ix) #include <time.h> #else *************** *** 39,44 **** --- 40,46 ---- #include <sys/time.h> #endif #include <fcntl.h> + #endif #include <setjmp.h> #include "screen.h" *** .orig/x11term.c Tue Nov 13 21:58:41 1990 --- /proj/epoch-3.2/src/x11term.c Tue Nov 13 22:02:31 1990 *************** *** 8,14 **** /* Load sys/types.h if not already loaded. In some systems loading it twice is suicidal. */ ! #ifndef makedev #include <sys/types.h> #endif --- 8,14 ---- /* Load sys/types.h if not already loaded. In some systems loading it twice is suicidal. */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif *************** *** 38,43 **** --- 38,44 ---- #include "x11term.h" + #ifndef SYSV386 #if defined(USG) && ! defined(IBMRTAIX) && !defined(OS_386ix) #include <time.h> #else *************** *** 45,50 **** --- 46,52 ---- #endif #include <fcntl.h> + #endif #include <stdio.h> #include <ctype.h> #include <errno.h> *** .orig/x11term.h Tue Nov 13 22:03:44 1990 --- /proj/epoch-3.2/src/x11term.h Tue Nov 13 22:04:08 1990 *************** *** 3,8 **** --- 3,9 ---- #include <X11/keysym.h> #include <X11/cursorfont.h> #include <X11/Xutil.h> + #include <X11/Xos.h> #define XMOUSEBUFSIZE 20 *** .orig/xevent.c Tue Nov 13 23:06:25 1990 --- /proj/epoch-3.2/src/xevent.c Tue Nov 13 23:06:51 1990 *************** *** 9,15 **** #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #ifndef makedev #include <sys/types.h> #endif --- 9,15 ---- #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif *** .orig/xresource.c Tue Nov 13 23:07:28 1990 --- /proj/epoch-3.2/src/xresource.c Tue Nov 13 23:07:53 1990 *************** *** 27,33 **** #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #ifndef makedev #include <sys/types.h> #endif --- 27,33 ---- #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif *** .orig/xutil.c Tue Nov 13 23:05:17 1990 --- /proj/epoch-3.2/src/xutil.c Tue Nov 13 23:45:31 1990 *************** *** 26,32 **** #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #ifndef makedev #include <sys/types.h> #endif --- 26,32 ---- #include <signal.h> #include <sys/ioctl.h> /* load sys/types.h, but make sure we haven't done it twice */ ! #if !(defined makedev) && !(defined SYSV386) #include <sys/types.h> #endif *************** *** 847,853 **** --- 847,855 ---- /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #ifdef HAVE_TIMEVAL + #ifndef SYSV386 #include <sys/time.h> + #endif #define TIMEMODULO 8388607L /* 2^23 - 1 */ DEFUN ("the-time",Fthe_time,Sthe_time,0,0,0, "an integer denoting the current time in milliseconds (modulo 2^23 - 1).") ----------------------------------- cut off ----------------------------------- Have a lot of fun with it ! - Thomas -- _______________________________________________________________________________ Mail: Thomas Roell (c/o Daniel Hernandez) Inst. f. Informatik / Technische Universitaet M"unchen Arcisstr. 21 / 8000 Munich 2 / Fed.Rep. of Germany E-Mail (domain): roell@lan.informatik.tu-muenchen.dbp.de UUCP (when above fails): roell@tumult.{uucp | informatik.tu-muenchen.de} -------------------------------------------------------------------------------