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.
The NOFORN flag controls foreign function interface code, which
was written using the dld_* APIs which haven't existed in years.
There was a GNU dld that provided this API, but it was withdrawn
in 2006.
If this code is to be re-enabled, it will have to be changed to
use the `dlopen` family of APIs.
When compiling for SunOS4, we would have a macro-ized version
of this function which required a slightly different call-site.
This removes all of that as it isn't used or needed.
* Support building on OpenBSD, x86-64
* Clean up OpenBSD Makefile
* Add OpenBSD to cmake build
* Use clang as CC for OpenBSD
Co-authored-by: Alex Segura <alex@lispm.dev>
We currently build for ISO C90 with GNU extensions. The GNU
extensions include both library and language features.
Compiling without GNU extensions results in a number of compilation
failures due to use of those library features.
With this, we'll build for ISO C99 with the GNU extensions and
can evaluate what's going on with those library features in the
future.
MDate, generated into `vdate.c` from `mkvdate.c`, was being
stored as a `long` rather than a `time_t`. This led to some
casts, but also a bit of platform #ifdef'd code.
This makes that go away by storing it as the `time_t` value
that it really is.
Also, update some comments and minor nits.
This doesn't remove or replace the existing build system, but
provides an alternative. It allows for faster builds with proper
incremental builds, as well as using tools such as `clang-tidy`,
which work better when they have a compiler commands 'database'.
This is very dated code that assumes there's a `/dev/ocr0`.
I'm not sure what system this was for, but it doesn't appear to
be one that exists currently.
Discussed in interlisp/medley#126.
This removes SYSVSIGNALS as we're always and only using POSIX
signals now.
Some platform differences have been papered over. We used to
only ignore SIGPIPE when using BSD signals, but we now ignore
it all the time.
While the SIGFPE code will now compile, it hasn't been updated
to work on modern OSes fully yet as it will need to enable
the correct FP exceptions.
glibc needs `_XOPEN_SOURCE` to have a declaration for
`ptsname()`. An easy way to get that without having to
know about particular `_XOPEN_SOURCE` values is to define
`_GNU_SOURCE`.
Closesinterlisp/medley#137.
As a prerequisite for cleaning up some other include issues, all the
include files in inc/ should have an include guard. All the xxxdefs.h
were created with them, but most older files were not.
* Clean up warnings when compiling with ethernet enabled
Add a dlpidefs.h header for prototypes of the dlpi.c functions.
Convert from bcopy() to memcpy().
Change some char to u_char as needed.
* Neither ether_addr_equal nor init_uid need to be defined if NOETHER is defined
This was used to indicate that the value was allowed to live
in a register. Compilers are much better now and can handle
this themselves.
This helps get rid of more platform-specific ifdef-ery.
The argument passed to the length parameter of lisp_string_to_c_string is
always the sizeof an array, and since it is compared to the Lisp unsigned
length of the Lisp string is more appropriately a size_t than an int.
Likewise for the index into a string.
We should be passing the size of the `struct sockaddr_un`, not
the length of the path + the size of the path field.
There is another `bind` call in this file that had it right.
We were filling in parts of a buffer and writing it, but that
left some parts either uninitialized or with stale data from
the last read.
This clears out the buffer first so that we're not sending junk.
`fnobj_lisp` was being treated as a `LispPTR*` when it was just
a `LispPTR`. This requires fixing up the printfs as well since it
is no longer a void* to treat it as `%p`.
* instanceof: Remove unused local var `type`.
* Remove unused N_OP_dtest.
This isn't used to actually implement the op. That is done via
the `DTEST` macro defined in `inc/inlineC.h` which duplicated
this code with minor differences in how it signals the error.