Combines arith2.c ... arith4.c files and their associated header files
into new arithops.c/arithopsdefs.h files, and adjusts the CMakeLists.txt,
and old-style makefile-tail. Also updates makefile-dos,
inlnPS2.h, and inlndos.h to reflect these changes, though these are not
used.
Combines the array..array6 files and their associated header files
into new arrayops.c/arrayopsdefs.h files, and adjusts the CMakeLists.txt
and old-style makefile-tail to reflect these changes.
* Pedantic C compilers want an extern declaration separate from initialization
* Remove duplicate definitions for fns in initdspdefs.h from display.h
* Remove misleading comments on structure member offsets and reorder to minimize padding
Add m68k to recognized CPUs (machinetype)
Add amigaos to recognized operating systems (osversion)
Add ability to override "config.guess" output w/ LDEARCH= to osversion
Add platform.h clauses to recognize AmigaOS 3 using gcc to cross-compile
Until these are superceded by github actions, if the github CLI tool "gh"
is installed, a github release of the maiko code can be created by running
./start-release
from the maiko/bin directory, and then running
./release-one
for each combination of OS/architecture that should be included in the
release.
The scripts assume that the maiko code is checked out in a directory
named "maiko" (and may produce unexpected results if run from somewhere else)
Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
* Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals
Replaces the SIGIO handler, which used to process X events in the interrupt context, with
a stub routine that sets a flag to signal processing is required.
Actual event processing is moved to the main dispatch loop where Lisp periodic interrupts
are handled.
Removes the X connection file descriptor from the set of fds contributing to SIGIO events
and moves the processing of X events to where the Lisp periodic interrupt is handled in
the main dispatch loop. This code is already guarded by a check for XPending() so can
be called regardless of whether any file descriptors are known to be ready.
Actual processing of async I/O events and X events are handled by procedures
process_io_events() and process_Xevents() respectively. For the most part these are
a renaming of getsignaldata() and getXsignaldata().
The Lisp periodic timer (VTALRM) was set to operate with a 25000 us period (40 Hz),
but on modern hardware it is possible to run this timer with a period of 10000 us (100 Hz)
Incidentally, a bug was noted (and fixed) in the X event handling code for motion events:
Mouse motion without any keyboard activity should not add an entry to the keyboard event
ring buffer as these events do not represent a key state change.
Since the ring buffer is of limited size, when it is filled new events are ignored
until the buffered events are processed. This resulted in the loss of a key/mouse button
transition (up or down) if the mouse was moved about "too much" between keyboard events.
A few incidental cleanups were also made:
- KBDEventFlg initialization fixed (wrong semantic type)
- Event_Req renamed to IO_Signalled (more appropriate name)
- int_io_open() sets up process (self) to handle SIGIO generated by O_ASYNC operations
- LOCK_X_EVENTS turned off since X library calls can no longer happen in an interrupt context
* Use of O_ASYNC must depend on the symbol being defined (looking at you, Cygwin)
* Add SA_RESTART flag to sigaction for SIGVTALRM periodic interrupt
* LOCK_X_UPDATE is no longer needed and should not be defined by default for Solaris in version.h
* Lock X updates for all systems and lock around X cleanup at exit
All systems which could generate I/O interrupts on the X file descriptor need
to have locking enabled, or there is a high probability that the X library
will deadlock. This requirement may be removed in the future with restructuring
of the way that the interrupt driven I/O is handled.
Ensure that the appropriate XLOCK/XUNLOCK is done around the X window
closing code.
* Also lock X updates when building with CMake.
* Remove code for unsupported Sun display configurations
Initial cleanup removing all code that was #ifdef'd for SUNDISPLAY.
Other SunWindows dependent code may also be removeable
* prropstyle will never be defined with no SunWindows support and therefore no pixrect code
* Remove code that is ifndef NOPIXRECT, since pixrects are part of the obsolete Sun windows code.
There are still traces of pixrect dependent code that could be removed.
The default targets differ depending on the display type and whether networking
is configured in or not, so it's more appropriate in the individual fragments
* Address older versions of C compiler which don't have __BYTE_ORDER__
* Checking for __GNUC__ is not sufficient to determine if builtins are available.
* Add makefile fragment for 32-bit PowerPC on Mac OSX build, and ignore the build directories.
* Add comment describing use of __BIG/LITTLE_ENDIAN__ definition
* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
needed because we aren't handling console messages.
Rather than having to specify or omit -DBYTESWAP in the Makefile
fragment for each system we can detect whether the system requires
byte swapping based on the __BYTE_ORDER__ C preprocessor definition.
Update CMakeLists.txt to account for this as well.
This was a machine running SunOS 4, which we no longer support.
It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.
It had a bit of inline assembly, but that is still present in
other files for other platforms.
Some versions of "make" do not predefine make variable RM (looking at you, FreeBSD)
so if it has NOT been defined we define it as "rm -f"
Also, update the cleanup target to use $(RM) rather than refering directly to "rm".
We no longer need to run a separate peephole optimization pass over the
compiler generated or hand-coded assembler for SunOS3 and SunOS4 on 68K or SPARC
We remove the preprocessor symbols and code controlled by them
SUN4_OS4_IL
SUN3_OS3_IL
SUN3_OS4_IL
and SUN3_OS3_OR_OS4_IL
This removes a bit of the debug info printing, but other than
that, is pretty close to what it was before.
We also now build it in both the make and cmake build systems.
This code has not worked for a long time. Most systems now maintain
the password entries so that a password is not accessible through the
getpwent() interface. The SUBR that calls this interface may be
removed at a future time.
We need to build `.o` files for the executables separately from
their link step. This lets us have the `CFLAGS` only get used
by the compilation step and not the link step (which uses
`LDFLAGS` or a variant).
This is a prerequisite for doing automatic dependency tracking.
This was making sure that the overflow in some our opcode
implementations was visible to the C code so that overflow
detection would work in gcc and clang.
This is now handled on those compilers by using some built-ins
that detect overflow.
The `-fwrapv` should no longer be needed.
ClosesInterlisp/medley#90.
This no longer had anything to do with profiling and was
only doing some defines for the switch case block addresses,
which we no longer need since there's no longer optional
asm generated for them.
This feature was controlled by the compilation flag `OPDISP`
which would enable some bits of assembler on the x86 (ISC or DOS)
or some other specialized code on SPARC. On SPARC hardware, there
was a special compilation process that would preprocess the code
and generate dispatch tables.
We do this now when this feature is enabled using gcc's computed
gotos feature. This is available in clang and some other compilers.
Notably, it isn't present in Visual Studio.
This doesn't decrease our portability at all as this feature is
optional and it replaces specialized assembler code with C using
compiler extensions (making it cross-platform).
In doing this, we've removed a bunch of related code, however,
it is likely that other pieces yet remain and will be removed
in subsequent commits as we clean things up and refine them.
This feature remains disabled by default for now.