This flag was for SunOS 3 and 4 on sun3 hardware (68k).
It enabled some unsafe optimizations via assembler. This hasn't
actually been built since the DOS port (since the header for this
was renamed, but the code in `xc.c` wasn't updated).
The optimizations here made assumptions that were specific to the
68k hardware and register allocation. They aren't likely to be
of much use moving forward, and we've got plenty of safe performance
improvements from the last 30 years of hardware advances.
* Use the real gethostid on Solaris.
Solaris has this, so we might as well use it like we do on other
platforms. This value is used in response to queries from it from
Lisp.
* Improve undefining of HAS_GETHOSTID.
Enable it on Solaris in `inc/version.h`. This file already
disables it on DOS, so no need to do so again in `src/initsout.c`.
Both sides of this #ifdef were the same, so just collapse it.
This code isn't actually relevant any longer, but this removes
an OS-specific #ifdef, making inspection of platform specific
code a bit easier.
This code was treating the `d_reclen` incorrectly from some of the
original old porting work. It is not the same as `d_namlen` and
`d_namlen` is not widely supported or standard. It should be using
`strlen(d_name)`.
This addresses an issue mentioned in interlisp/medley#103.
* Include <ieeefp.h> for Solaris.
* Remove sections for sparc and Sun i386 for non-Solaris.
* Have Linux use the same code as FreeBSD and macOS.
* Make the FreeBSD / Linux / macOS code path the default, if nothing
special is defined since it is the modern way.
* Remove fpstatus_() usage from the ancient days.
When `FLTINT` is defined (which is currently only on SunOS), if
`OS5` was not defined, then it tried to use `ieee_handler` which
doesn't exist on Linux and friends. If we were to enable `FLTINT`
on more platforms, then we'd want to always be using more modern
signal handling and not `ieee_handler`.
* Check.h, Stipple.h, XCursors.h, XWaitCur.h, Xcursdef.h,
Xdefcur.h, and Xicon.h were combined into xbitmaps.h.
* Xdisplay.h is not used and the contents are in MyWindow.h, which
is used.
* XVersion.h and Xdeflt.h became xdefs.h. Remove 2 stragglers
that were still including XVersion.h.
X11R1 was released in 1987 and superseded by X11R2 in 1988.
We should be able to safely remove this code. We set the
preprocessor variable on all platforms to indicate that we're
on X11R4 (or later, I guess).
`timer.c` uses `F_SETSIG` which is a GNU extension. As such, it
needs `_GNU_SOURCE` to be defined, but this was only done for
x86_64, not the other Linux platforms that we have build system
support for.
Closesinterlisp/medley#97.
* Move clang/gcc options into makefile-header.
This puts all of the shared options into a single place so that
we can easily update it.
* Add -fwrapv to the clang/gcc command lines.
This is a step along the way to fixing interlisp/medley#90.
Enabling `-fwrapv` will let overflow checks that rely upon undefined
behavior to work correctly. Without this, with modern versions of
clang and gcc, the overflow checks in the C code are eliminated
by the compiler, resulting in incorrect behavior on the part of
Maiko.
See the linked bug for details and discussion.
Hopefully, this usage of `-fwrapv` will go away once we're using
the correct compiler builtins to detect and handle overflow
correctly.
CLX is a Common Lisp implementation of the X client library.
It has some code in C, which was present here as `src/socket.c`
and `src/socdvr.c`, exposed via opcodes in `src/subr.c`. This code
had been removed (with prejudice apparently) by commenting out
the code in `src/subr.c` with `#if NEVER`.
This code would've been used by the Medley system images, but
that code doesn't appear to be present. (There may or may not
be something related in `XMAS` in the Medley repository.)
* Remove static char *id = from all source files.
The same information is included in a comment in each source file.
* Remove unused template file 'id'
The FSERROR define is on all the time now. It was not controlling
all of the functionality, with many places setting Lisp_errnno
outside of the code controlled by the define.
The `open()` call can take a third argument (for when the mode
is `O_CREAT`). However, it is not needed here as we aren't
using `O_CREAT`. (And if we needed an extra arg, it wouldn't
have been `NULL`.)
* FD_ISSET requires that the fd being tested is >= 0, so unset fd -1 causes trouble.
* Remove code to enable X I/O signal generation from xinit.c
If the I/O signals are enabled before the signal handler has
been set up, the default action on receipt of a SIGPOLL or SIGIO
will be that the program exits. For now, turn the signals off,
as they aren't necessary and may not even be an improvement.
* Ensure fds are declared as signed and initialized (to -1)
The global fds may be accessed from the signal handler before any
particular device has been opened. Ensure that the fds are initialized
statically and that the value is distinguishable from all valid descriptors.
modified: initdsp.c
modified: initkbd.c
modified: keyevent.c
modified: osmsg.c
modified: rs232c.c
modified: timer.c
modified: tty.c
This wasn't enabled and the corresponding code wouldn't have
compiled. The `utime()` function is also deprecated in POSIX.
This used to be enabled for HPUX and RISCOS.