1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 23:46:14 +00:00

546 Commits

Author SHA1 Message Date
Bruce Mitchener
0010a02cb1
Disallow UNALIGNED_FETCH_OK on ARM, not LINUX. (#258)
UNALIGNED_FETCH_OK shouldn't be set for an entire OS, but
based on the CPU architecture.

Some ARM systems don't allow unaligned reads. x86 and x86_64
do, so update how we configure this.
2021-01-21 02:26:47 +00:00
Bruce Mitchener
819f1c6c0a
Fix crash in xrdopt. (#260)
In 85fa89ba88fb34c04d1710ac0f4d32a91c94af3b, I removed 2 entries
from a table, but didn't update the count. This leads to a
`SIGSEGV`.
2021-01-21 02:19:29 +00:00
Bruce Mitchener
45d67305e7
Remove ANSICC and related variables. (#257)
In the SunOS 4 days, the system cc apparently couldn't compile
the lp* files, so there was an arrangement to use an `ANSICC`,
which was just `gcc`, to build those files.

We no longer have this issue.
2021-01-20 09:43:46 -08:00
Bruce Mitchener
d311b0f4c8
Remove unintentional coercion from float to double. (#256)
By adding `0.0` and not `0.0f` and by calling `fmod()` rather than
`fmodf()`, we were unintentionally coercing the value from a
`float` to a `double`.

This resulted in x86_64 assembler like this:

```
    cvtss2sd %xmm0,%xmm0
    cvtss2sd %xmm1,%xmm1
    callq  403340 <fmod@plt>
    cvtsd2ss %xmm0,%xmm0
```

which is now:

```
    callq  403360 <fmodf@plt>
```

And for the `N_OP_equal` change:

```
    cvtss2sd %xmm0,%xmm0
    xorpd  %xmm2,%xmm2
    addsd  %xmm2,%xmm0
    cvtss2sd %xmm1,%xmm1
    addsd  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomisd %xmm1,%xmm0
```

is now:

```
    xorps  %xmm2,%xmm2
    addss  %xmm2,%xmm0
    addss  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomiss %xmm1,%xmm0
```

(Note `ss` rather than `sd`, along with the missing `cvtss2sd` calls.)
2021-01-20 09:36:13 -08:00
Bruce Mitchener
a427d9f394
Remove stderr output from mkvdate. (#255)
This shows up on every build and isn't needed.
2021-01-20 09:29:38 -08:00
Bruce Mitchener
addaad51fc
Remove SunOS4 removal of __inline__. (#253) 2021-01-20 17:28:06 +00:00
Bruce Mitchener
6c1bfeaf79
Use MAIKO_ARCH_SPARC rather than sparc. (#252) 2021-01-19 23:50:03 -08:00
Bruce Mitchener
85fa89ba88
Remove key checking code. (#251)
This wasn't actually hooked up any more, so it was pretty much
all dead code. The handling of this in the command line options
is gone.

In `bin/makefile-tail`, `DEVFILES` and `LIBFILES` became identical, so
`DEVFILES` went away.
2021-01-19 23:47:55 -08:00
Bruce Mitchener
397143d760
xc.c: Remove sparc-only optimization hack. (#254)
It looks like this was trying to force a pointer into a register,
but only for SPARC.
2021-01-20 07:46:43 +00:00
Bruce Mitchener
d99209916a
Remove bin/launch.asm. (#249)
This was a copy of `src/launch.asm`. Part of the DOS build process
made a copy, but that isn't something that needs to be in version
control.
2021-01-20 06:10:11 +00:00
Bruce Mitchener
f4c2f872a1
Remove bin/runlisp* (#250)
These are from when people were running lde on a small set of hosts
and needed some keys hardcoded. They are no longer relevant.
2021-01-20 06:07:45 +00:00
Bruce Mitchener
c51aff7bf3
Remove endiffix relics. (#248)
This isn't something we need around or even have the full source
for. It is a SPARC binary and a lexer script.
2021-01-19 21:45:43 -08:00
Bruce Mitchener
26bccdb3a8
Change some NOPIXRECT checks to SUNDISPLAY or remove. (#244) 2021-01-19 21:30:52 -08:00
Bruce Mitchener
e63c53cc06
Move SunOS 3 and 4 makefiles to legacy directory. (#245)
We don't remove them for now as we still reference the build
options as we work through things.
2021-01-19 21:27:22 -08:00
Bruce Mitchener
3318e75f7a
Remove csh version of makeright. (#246)
In 2001, makeright was ported from csh to bash. This is the old
csh version.
2021-01-19 21:26:09 -08:00
Bruce Mitchener
2ffcc4209d
Remove macOS 11 from GitHub Actions. (#247)
This platform is experimental on their end and is having
capacity problems. We don't need it for now and the noise
of the failures is not worth it.
2021-01-19 21:24:39 -08:00
Bruce Mitchener
6f7ec059bc
Remove dead stores. (#240) 2021-01-19 21:23:26 -08:00
Bruce Mitchener
0a057dec6b
Delete code related to NATIVETRAN feature. (#232)
* Delete code related to NATIVETRAN feature.

This was obsolete work that had been done for generating
native code from the bytecode.

Closes Interlisp/medley#89.

* Remove unused SaveD6.
2021-01-19 17:57:53 -08:00
Bruce Mitchener
c89b6fd611
Use the C99 floating point error code on Solaris. (#243)
Previously, we were building as C89 and the new code required
the C99 flag on Solaris with Sun Studio. Now that we build as
C99, this should work now and we can remove the special case
code.
2021-01-19 19:35:00 +00:00
Nick Briggs
26857f3131
Change icon, cursor images and masks to const uint8_t (#239)
The predefined cursors (image and mask) are better represented
as arrays of const uint8_t rather than char.  Likewise for the
window icon.  Track this change in the functions that take the
image and mask as arguments, casting only when we get to the
X library functions that take char*.
2021-01-19 10:16:08 -08:00
Bruce Mitchener
a42189fb8b conspage: Fix uninitialized memory read. (#242)
If `prior` was not set, then `priorpg` would be uninitialized and
was subsequently used in a comparison. It should be initialized
to `NULL`.
2021-01-19 09:28:40 -08:00
Bruce Mitchener
616b526516
No mode_t for open() for opening read-only file. (#241) 2021-01-19 08:40:33 -08:00
Bruce Mitchener
7a24b41fc4
Fix !XWINDOW to be SUNDISPLAY ifdefery. (#234)
Some of the `ifndef XWINDOW` code should have been
`ifdef SUNDISPLAY` instead.
2021-01-18 23:45:59 -08:00
Bruce Mitchener
db6b351397
Remove FORKCOMM define. (#238)
This code path was followed everywhere except DOS, so remove
it from the build system, and adjust the code.
2021-01-18 22:12:41 -08:00
Bruce Mitchener
c4e4c5ec5b
Fix sunwindow include ifdefery on vmemsave.c. (#236)
The cursor management code is `#ifdef` `SUNDISPLAY` and
`OLD_CURSOR`, not `NOPIXRECT`, so do the same for the
header include.
2021-01-18 22:11:42 -08:00
Bruce Mitchener
7549c746eb
Remove old xXWINDOW code. (#233)
This looks like code that was a mix of SUNDISPLAY and XWINDOW.
But it isn't valid any longer...
2021-01-19 04:52:50 +00:00
Bruce Mitchener
c9a72229dd
Bit of cleanup for Lisp_Xinitialized. (#237)
* Bit of cleanup for Lisp_Xinitialized.

* Remove the `extern` from `xcursor.c`, where it was not used.
* Move the definition from `main.c` to `xinit.c` as it is
  the only file using it.
* Use `stdbool.h` for it rather than an `int` with custom `TRUE`
  and `FALSE` values.

* Add some asserts with Lisp_Xinitialized.
2021-01-19 04:46:20 +00:00
Bruce Mitchener
32a4b52c66
GitHub Actions: Add builds using cmake. (#231) 2021-01-17 05:01:59 +00:00
Bruce Mitchener
be7f43322e
Remove unnecessary codepaths for ISC. (#230)
ISC support had some extra code paths that were largely
duplicates of what was for non-ISC. They are not needed
any longer.
2021-01-15 21:01:40 -08:00
Nick Briggs
7ce6a55499 ForkUnixShell: cleanup unsafe code 2021-01-15 20:36:37 -08:00
Nick Briggs
2bb5854303
Remove -funsigned-char from standard compilation options (Issue Interlisp/medley#152) (#229)
Add standardized options for Oracle Developer Studio C compiler (aka SunPro C)

Using -funsigned-char causes the Oracle Developer Studio C compiler typedefs for
int8_t to become unsigned (uint8_t) rather than signed, with no warning or
other indication that this has happened.
2021-01-15 19:47:06 -08:00
Bruce Mitchener
16093186ee
Remove incorrect SUN3_OS3_OS4_il ifdef. (#228)
The definition of a function was ifdef'd out, making it seem
like perhaps there was an assembly implementation, but there
isn't. That platform support is dead weight also at this point,
so removing this because it isn't something that will come back
is fine.
2021-01-15 19:44:12 -08:00
Bruce Mitchener
4c84412c84
Correct some ifdefs from ISC to RESWAPPEDCODESTREAM. (#227)
`RESWAPPEDCODESTREAM` was only used on ISC, so some `#ifdef`'s were
previously set up incorrectly.
2021-01-15 19:33:39 -08:00
Bruce Mitchener
3480ee9711
Fix typos. (#226) 2021-01-15 16:59:32 +00:00
Bruce Mitchener
373f66c855
GitHub Actions: Skip build-pi when not in Interlisp/maiko. (#224)
The build-pi builder is self-hosted, so it may not be present,
and isn't present in forks of this repo, making the CI less
useful.
2021-01-14 07:32:36 +00:00
Nick Briggs
ebc4a24d0b
Fix various spelling, grammatical, and punctuation errors (#222) 2021-01-13 23:08:35 -08:00
Bruce Mitchener
be9c0c30c4
GitHub Actions: Update syntax for installing a cask from homebrew. (#225)
Homebrew on the macOS build machines for GitHub Actions was
updated to version 2.7 and that deprecated the `brew cask install`
syntax in favor of `brew install --cask`, so we need to update
here.

The announcement for the GitHub change is:

https://github.com/actions/virtual-environments/issues/2415
2021-01-13 23:07:39 -08:00
Bruce Mitchener
fdcc4017f7
unixfork.c needs to define flushing. (#223)
This shouldn't be an `extern` decl here as `unixfork.c` is built
into `lde` which doesn't get a copy of `main.c` linked in.
2021-01-13 22:55:47 -08:00
Larry Masinter
fc81b26085 Add build for self-hosted linux ARM (pi) 2021-01-13 14:43:47 -08:00
Bruce Mitchener
71a04ce117
Remove unused FileIOFlag, TimerFlag. (#221) 2021-01-13 10:58:58 -08:00
Bruce Mitchener
0fbf5e8281
Rename NOETHER to MAIKO_ENABLE_ETHERNET. (#219)
Like the renaming of NOFORN, this gets rid of some double
negatives. It also removes some patterns where we had:

```
    #ifdef NOETHER
    #else
    ...
    #endif
```

and replaces them with:

```
    #ifdef MAIKO_ENABLE_ETHERNET
    ...
    #endif
```
2021-01-13 17:54:54 +00:00
Bruce Mitchener
62a8d400ce
Use sig_atomic_t for FP_error when using FP exceptions. (#220)
`sig_atomic_t` is usually `int`, but is the typedef that one
should use for flags written to from a signal handler.
2021-01-13 17:52:53 +00:00
Bruce Mitchener
d3efbc3441
Remove HAS_GETHOSTID. (#218)
This is only true on DOS now. It was previously true on older
unsupported platforms, but they are gone now.
2021-01-12 20:10:21 -08:00
Bruce Mitchener
7145f0d380
Rename NOFORN to MAIKO_ENABLE_FOREIGN_FUNCTION_INTERFACE. (#217)
This lets us get rid of double-negatives, which are confusing,
and starts a naming scheme that is easier to see when something
is a Maiko flag versus something else.
2021-01-12 20:04:23 -08:00
Bruce Mitchener
7b979dd789
Add maiko/platform.h to detect OS + CPU. (#216)
This also adds a bit to the `-info` output to say which OS and CPU
are being targeted.

This can be used in subsequent commits to drive whether or not
we need `BYTESWAP` and whether or not unaligned memory access
is okay.

We'll be able to remove per-platform defines from all of the
makefiles and cmake.
2021-01-13 03:01:49 +00:00
Bruce Mitchener
414a4ecbbd
Remove #ifdef LINUX max/min definitions. (#215)
These don't appear to be needed.
2021-01-12 17:21:54 -08:00
Bruce Mitchener
19329883d5
Add missing foreigndefs.h, includes to foreign.c. (#214) 2021-01-12 17:14:19 -08:00
Bruce Mitchener
c7314dcb31
Remove -DLINUX from Cygwin makefile. (#213)
This might have been necessary before where we had bits of code
that were still `#ifdef LINUX`, but that's mostly gone now, so
this should no longer be required.
2021-01-12 17:46:48 +00:00
Bruce Mitchener
5cb18c0710
Merge hacks.c into foreign.c. (#212)
This code was not really valid ANSI C in the way that it was
used, and it was only used by foreign.c, which is #ifdef'd out.
2021-01-11 22:45:49 -08:00
Nick Briggs
fac400f918
Clean up CMakeLists.txt for Solaris (SunOS5) builds with ethernet enabled (#210)
dlpidefs.h was missing from the list of headers.
Solaris compiles should have USE_DLPI set.
ldeether depends on the dlpi object in the maiko library.
2021-01-11 20:30:56 -08:00