particularly in lambda lists of generated code.
And remove eval-when from SB-GROVEL::DEFINE-C-STRUCT. It could simply become
part of the macroexpansion of DEFINE-C-STRUCT if needed, but it isn't.
It shouldn't use UNWIND-PROTECT or call malloc, but instead just have WITH-ALIEN
utilize the alien stack. Nor should it gensym so much, or use so much EVAL-WHEN.
It's as if sb-grovel's author didn't know how macros or SB-ALIEN work.
In making this change I noticed that the field initializer list is always null
as used within SBCL. And as sb-grovel has no tests, it is impossible to conclude
that this aspect of the macro is even necessary, never mind bug-free.
If loaded without :ASDF in *FEATURES*, then you get only the code up to
and including C-CONSTANTS-EXTRACT, no CLOS classes and methods.
If then reloaded with :ASDF in *FEATURES*, a symbol conflict occurs.
This works around it.
If the shell environment contains SBCL_MACOSX_VERSION_MIN=10.6
then it overrides the autodetection. There are a few issues with
autodetection- that's it's obsolete, that Config is included before
it contains correct values, that we relied on silently-ignore-missing
include feature of Make, and the the default in the absence of a
known darwin9 platform is to assume lower-than-9. Too many problems.
In the past sb-grovel treated everything as `int', but now it uses long.
Which caused problems with win64, where things that were expected to
be signed became unsigned.
On x86-64: if a value fits into 4 bytes, cast it to `int', effectively using
(sizeof(x) == 4)? (long) (int) (x): (x)
with obvious differences for long-long on win64.
This restores the previous behaviour while allowing for `long'
constants to be grovelled.
Android doesn't have a working getprotobyname, but even for other
platforms iterating over a small number of predefined protocols is
much faster, and some default installations do not come bundled with
/etc/protocols.
Also, move contrib output to obj/sbcl-home/, asdf cache to obj/asdf-cache/
Update sb-grovel and other contribs and their tests for asdf3.
Fixes lp#1132254.
* sb-unix:unix-stat/lstat/fstat return the 32bit inode with x86 and
the 64bit inode with x86-64,
* sb-posix:stat/lstat/fstat get stat values using the old stat calls
with x86 and the new ones with x86-64
* re-enable now-working sb-posix stat tests
* on x86/darwin use -arch i386 flags in sb-grovel C compilation
* comment out failing sb-posix tests
* add -arch i386 flags to Config.x86-darwin CFLAGS and LINKFLAGS
* remove #include <ucontext.h> instances
* Even though we don't know the exact upgraded array element type, we
do know the result is a character.
* Noticed while wondering why C-ESCAPE had a call to %MEMBER instead
of %MEMBER-EQ.
* Add condition classes to SB-POSIX that are subclasses of FILE-ERROR,
to give more precise information than vanilla FILE-ERRORs after
users load SB-POSIX.
* Add code to sb-grovel in support of same.
* Do the groveling part of sb-grovel only at contrib build time.
If the contrib is later recompiled, reuse the results from that
grovel.
* Doesn't solve the asdf-binary-locations problems related to
groveling, but it looks as if asdf-binary-locations is already
automatically adding SBCL_HOME into it's exceptions list.
* sb-grovel was compiling the C file in 32-bit mode (the default) on
darwin even when being run from in x86-64 mode. add "-arch"
"x86_64" to args to CC.
* remove darwin sepecific version of the stat structure. Turns out
the original stat struct was really ok but that we were getting
thrown off by the wrong types coming back from sb-grovel.
Provide a better diagnostic for apparently broken
SB-BSD-SOCKETS installs. Also print a better error message and
return an error code from make-target-contrib.sh if any
contribs fail, so that these broken installs are less likely
to happen.
Support files >2GB on Linux/x86.
* Compile the runtime (and the C type grovelers) with various flags
to enable a 64-bit off_t.
* Add C-side wrappers for various POSIX functions, so that we can
reliably get the largefile versions of them from Lisp-side.
* Check for correct "expand" in canonicalize-whitespace, and skip
canonicalization if it doesn't seem right. (Windows "expand" is
something quite different.)
* RUN-PROGRAM now always returns a process structure, which reports
the exit-code of the process when :WAIT was true. :WAIT nil
process-structures still keep their :RUNNING status indefinitely
on Windows, though.
* FIND-EXECUTABLE-IN-SEARCH-PATH actually searches the path, and adds
"exe" as :TYPE if :TYPE is missing on Windows.
* ASDF:RUN-SHELL-COMMAND searches for Bourne-shell on Windows, as there
is no default location.
* SB-GROVEL directly runs gcc and the groveler instead of indirecting
via shell, and the groveler directly writes to the lisp-file instead
of via stdout and shell redirection.
* Hack SB-POSIX till it builds and passes all applicable tests on Windows.
Mostly this involved plenty of #-win32, but a few tests needed to
be adjusted for the delication Microsoft constitution.
* Implement COPY-STREAM in ASDF-INSTALL so that it doesn't have to
depend on SB-EXECUTABLE.
* Take the .exe suffix into account when installing over an old SBCL
on MSYS.
* Adjust UNPARSE-NATIVE-WIN32-NAMESTRING slightly: Windows OS functions
like stat don't like to have directory names ending with a slash.
This is good enough to run unpatched Slime with *COMMUNICATION-STYLE*
NIL, and build & pass tests with all contribs except SB-SIMPLE-STREAMS.
Improve ENUM support a little. (VJA sbcl-devel 2004-12-09)
... SB-ALIEN enums not limited to symbols any more;
... SB-GROVEL enum grovelation;
... tests (which pass despite the current, erm, suboptimality
of arithmetic :)
Fix SB-GROVEL to make less catastrophic types
Thanks to Christophe for most (in fact, all except 2) of these
fixes.
* Make sb-grovel's compile failures a bit clearer: There are now
separate conditions for c-compile-failed, a-dot-out-failed, and
the normal lisp compile/load failures.
* don't use gensym for structure member names; This confused the
environment horribly.
* make identity-1 a macro so that its uses get optimized away.
As a result,
* sb-bsd-sockets::make-host-ent doesn't throw a compiler optimization
note on run time any more.
* sb-grovel doesn't lie about vector types on array structure fields'
SETF accessor any more. As a result, no more type error warnings on
constants.lisp-temp compilation any more!
* sb-bsd-sockets' getprotobyname alien function accepts a
(* protoent) structure now.
* export error-component and error-operation from asdf.lisp
sb-grovel & sb-posix symbol export changes
... sb-grovel no longer quietly exports every constant
... instead, I restored the old default of not exporting the symbol
(and, additionally:) unless asked to
... sb-posix now exports all groveled-for constants and
structure/class accessors
... (implicitly:) sb-bsd-sockets now does no more export its
constants. This corresponds to the behavior before 0.8.11.65.
MORE ALIENS! sb-grovel now defines alien structures.
Affected:
... sb-grovel, obviously. Reworked the def-to-lisp mechanism a bit
and then hacked foreign-glue.
.... array-data.lisp isn't needed by sb-grovel any more, and any
code that uses it will probably break anyway; removed it.
.... The Manual: Now there's a section on sb-grovel usage.
sb-grovel's README is no more.
... sb-bsd-sockets: It had to learn to use aliens instead of
non-typechecked lisp arrays. I hope there are no memory leaks.
... ditto for sb-posix.
Thanks to vja for patches & patiently testing my changes on
x86 and SPARC.
Merge patch (Vincent Arkesteijn sbcl-devel 2004-02-03) for
ASDF-INSTALL (and my patch lisppaste/113 for namestrings)
... :name "" no longer prints the same as :name nil
... make the asdf-install:directorified pathname more
robustly
... also add a couple of :supersedes. ARGH WHY DOES
SB-BSD-SOCKETS STILL HAVE ITS OWN FAKE SB-GROVELALIKE?
Ouch. That was hard work.
... contrib fix primarily for SunOS but also I think for Darwin;
at least, if it was working it was only by accident.
... uname -m never returns either "solaris" or "darwin", so that
code was wrong to start with;
... change the protocol so that we do EXTRA_CFLAGS rather than
a complete override; now we don't need the solaris or
darwin clauses in asdf-module.mk that weren't being used
anyway;
... delete more stuff in make-target-contrib.sh so that we can
actually see the effect of these changes rather than
blindly reusing an old alien.so (which explains why I
hadn't noticed this before, *sigh*; I ran a completely
clean build on Solaris for the first time in months
yesterday)
... now sb-bsd-sockets and dependents work again. I hope I haven't
broken x86-64 in the process.
* Add tools-for-build program to determine if asm/ldt.h has the
new name for the modify_ldt structure.
* Fixes to properly compile contribs on x86_64 systems