Commit graph

3128 commits

Author SHA1 Message Date
Alex Shinn
00d084414e
Merge pull request #563 from fisherro/chicken-5-support
Change snow-chibi to work with Chicken 5
2019-08-31 22:37:50 +08:00
Alex Shinn
ae98680259
Merge pull request #564 from katterjohn/process-bsd-fix
(chibi process): fix process-running? on OpenBSD, NetBSD and DragonFly
2019-08-31 22:36:49 +08:00
Kris Katterjohn
3da3f3cab3 (chibi process): fix process-running? on OpenBSD, NetBSD and DragonFly
tl;dr process-running? would always return #f on OpenBSD and
NetBSD, and in the one-argument case it would always return #t
on DragonFly.

To get the process information from the process table on OpenBSD
and NetBSD, we need to pass 6 level names to sysctl instead of 4.
Passing the wrong number of level names to sysctl has caused it
to always fail, which in turn caused process-running? to always
return #f:

  (process-running? 1)                        =>  #f
  (process-running? (current-process-id))     =>  #f

and so on.

After the above fix, we also need to check the amount of data
actually filled in by sysctl.  It appears that on OpenBSD, NetBSD
and DragonFly, if the requested process doesn't exist then sysctl
will return with a return value of 0 and just not actually fill in
the given structure.  This caused process-running? to return #t
when no process with the given PID existed:

  (process-running? -1)                       =>  #t
  (process-running? <other nonexistent pid>)  =>  #t

and so on.

I have tested on OpenBSD, NetBSD, DragonFly BSD and FreeBSD, and
process-running? now behaves as expected on all of them.
2019-08-30 13:05:32 -05:00
Robert Fisher
7f3d322407 Fix installation for Chicken 5
To get the repository path in Chicken 5, we not only have to require the
chicken.platform module, we also need to take the car of the result
since it now returns a list.
2019-08-29 11:42:21 -05:00
Robert Fisher
13d4bbf1d1 Change snow-chibi to work with Chicken 5
The method snow-chibi used to get the version of Chicken installed
doesn't work with Chicken 5. Adding "-R chicken.platform" would make it
work with Chicken 5, but then it wouldn't work with Chicken 4.

In both Chicken 4 & 5, however, csi has a -release option that will just
give the version number. So, I've changed the Chicken version detection
in snow-chibi to use this option.

Testing with...

	./chibi-scheme tools/snow-chibi.scm implementations

...then seemed to work with both Chicken 4 & 5.
2019-08-29 09:16:36 -05:00
Alex Shinn
0bfc31a1e5 check for too many args to if (issue #561) 2019-08-29 21:56:00 +08:00
Alex Shinn
4282a6da0d
Merge pull request #562 from katterjohn/git-ignore-pty
Add lib/chibi/pty.c to .gitignore
2019-08-29 21:50:25 +08:00
Kris Katterjohn
789abbabb3 Add lib/chibi/pty.c to .gitignore 2019-08-28 19:38:08 -05:00
Alex Shinn
19f408a041 Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-08-24 22:34:30 +08:00
Alex Shinn
e7b9510656 allowing required args in opt-lambda, adding define-opt 2019-08-24 22:34:20 +08:00
Alex Shinn
8645b23d42 fixing bug in pp-with-indent on dotted list 2019-08-24 16:00:47 +08:00
Alex Shinn
31cea4af6d
Merge pull request #560 from okuoku/disable-pty-cmake
(chibi pty): Disable in CMake build
2019-08-24 11:18:11 +08:00
okuoku
753e9e89d1 (chibi pty): Disable in CMake build
Disable `(chibi pty)` build with CMake.
2019-08-24 07:08:47 +09:00
Alex Shinn
cc1ca2622d
Merge pull request #559 from katterjohn/pty-bsd-fix
(chibi pty): fix compilation errors on the BSDs
2019-08-23 20:08:46 +08:00
Kris Katterjohn
8b6e236b09 (chibi pty): fix compilation errors on the BSDs
* Include util.h instead of pty.h on OpenBSD and NetBSD

* Include libutil.h instead of pty.h on FreeBSD and DragonFly BSD

* Include utmp.h only on non-BSD systems (FreeBSD does not have that
  header and none of these BSDs require it)

Tested on all four of these BSDs.
2019-08-22 16:33:10 -05:00
Alex Shinn
a9cebfb8da adding wip json parser 2019-08-23 00:45:58 +08:00
Alex Shinn
c7d2638fbc s/pty.h/util.h on macosx (fixes issue #558) 2019-08-22 23:53:42 +08:00
Alex Shinn
8ea1852ac1 adding (chibi pty) 2019-08-19 23:03:09 +08:00
Alex Shinn
ec09e0eed4 Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-08-19 21:53:12 +08:00
Alex Shinn
4aac80e41b
Merge pull request #555 from richlowe/sunos-build
build on Solaris-like systems
2019-08-17 21:56:07 +08:00
Alex Shinn
42b6eeff1b fix string-mismatch usage in (chibi repl) 2019-08-16 23:39:36 +08:00
Alex Shinn
56acd0eb56
Merge pull request #556 from katterjohn/bsd-detection
Fix NetBSD, DragonFly BSD and Darwin feature detection
2019-08-16 22:35:14 +08:00
Kris Katterjohn
4c1af8c92a Fix NetBSD, DragonFly BSD and Darwin feature detection
On NetBSD systems the netbsd feature identifier was not actually
provided because the macro SEXP_NETBSD was defined twice and the
second value was 0.

On DragonFly systems the dragonfly feature identifier was not actually
provided because the macro SEXP_DRAGONFLY was defined twice and the
second value was 0.  Also on DragonFly systems the darwin feature
identifier was incorrectly provided because SEXP_DARWIN had a value of
1 instead of 0.
2019-08-15 19:03:57 -05:00
Alex Shinn
83cfc7dd53 adding len limit on ffi auto-expand vars (issue #553) 2019-08-15 23:42:17 +08:00
Alex Shinn
39f34ffffb adding port-source?[-set!] to ast 2019-08-15 23:18:07 +08:00
Alex Shinn
93b718f7c3 adding set-source to ast 2019-08-15 23:11:39 +08:00
Richard Lowe
2311e41003 build on Solaris-like systems 2019-08-11 22:30:17 +00:00
Alex Shinn
a01de232b2
Merge pull request #554 from apg/apg/bsd-feature-expansion
Add features for the various BSDs.
2019-08-03 11:45:43 +08:00
Andrew Gwozdziewycz
e5ae89c9c6 Define / detect explicit features for BSD platforms 2019-08-02 11:33:59 -07:00
Andrew Gwozdziewycz
ac467ea314 Add features for the various BSDs.
This could and should be done cleaner. Works as a proof of concept at
this point in time.
2019-08-02 01:56:51 -07:00
Alex Shinn
a8680bb0b4
Merge pull request #551 from v01dXYZ/master
Fix include-shared for process
2019-07-24 22:54:30 +08:00
Alex Shinn
2a9bb14d2d
Merge pull request #548 from pclouds/sre-error-check
More error checking on some SRE syntax
2019-07-24 22:47:36 +08:00
v01dXYZ
94ca5a95ca
Fix include-shared for process
`chibi-genstatic` doesn't support expansion of `cond-expand` when the pattern is `(cond-expand (cond) (else (include-shared "module")))`
2019-07-24 11:10:04 +00:00
Nguyễn Thái Ngọc Duy
829d963a9d More error checking on some SRE syntax
When char-set, w/case, w/nocase, w/ascii or w/unicode is applied on a
<cset-sre>, only (cadr sre) is taken, the rest is ignored. Which is the
right thing to do only if (null? (cddr sre)). If there are more
arguments, error out instead of silently ignoring them.
2019-07-21 10:46:44 +07:00
Alex Shinn
b3831c3995
Merge pull request #544 from okuoku/win32-dll
Properly support DLL build on Win32
2019-07-12 00:06:31 +08:00
Alex Shinn
27e67b0ae4 Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-07-12 00:05:10 +08:00
Alex Shinn
597df2e931 missing space before quote (issue #545) 2019-07-12 00:04:52 +08:00
okuoku
205bda5ab4 cmake: Support shared-library builds
Support shared-library (DLL on Win32) builds and defaults on it.
2019-06-23 05:46:25 +09:00
okuoku
3d4e8bb3e6 Introduce SEXP_STATIC_LIBRARY
Introduce SEXP_STATIC_LIBRARY to support static-library build on
Win32/Win64. On Win32, symbol visibility is enforced on DLL builds so we
need to dedicated ABI on static-library builds.
2019-06-23 05:46:22 +09:00
Alex Shinn
6a35a95dfc
Merge pull request #540 from wasamasa/read-error-for-unterminated-strings
Consider unterminated strings as read-error
2019-05-23 14:33:51 +08:00
Alex Shinn
bbcb571ba5 fix comparison of negative bignums (issue #541) 2019-05-21 22:26:37 +08:00
Vasilij Schneidermann
ab39f12904 Consider unterminated strings as read-error 2019-05-17 10:55:22 +02:00
Alex Shinn
104811942f fixing read-line on network ports 2019-05-04 13:18:27 +08:00
Alex Shinn
26ceb64434 fix exact neg check for ratio in rounding (issue #539) 2019-05-03 00:37:30 +08:00
Alex Shinn
624b54c05c
Merge pull request #537 from lassik/fix-printf-warning
Avoid compiler warning about mismatched printf types
2019-04-26 22:33:14 +08:00
Lassi Kortela
2dc4353604 Avoid compiler warning about mismatched printf types
Under Unix with SEXP_64_BIT defined, sexp_sint_t is defined as 'long'.
But we would get the equivalent format specifier SEXP_PRIdFIXNUM from
the OS-defined PRId64 in <inttypes.h>. MacOS defines it as "lld". This
causes the clang printf checker to emit a warning about the 'long' and
'long long' mismatch.

Fix by avoiding system-defined PRId32 and PRId64 format specifiers and
always defining SEXP_PRIdFIXNUM as "d", "ld" or "lld" according to our
definition of sexp_sint_t as int, long or long long. This also means
we don't need to include <inttypes.h> any more.
2019-04-24 12:26:01 +03:00
Alex Shinn
105a4672e7 more helpful error messages on missing libraries 2019-04-21 22:11:11 +08:00
Alex Shinn
4cba9d3e6c Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-04-02 22:31:45 +08:00
Alex Shinn
08140baa3e making builtin write bounded to avoid cycles (fixes issue #532) 2019-04-02 22:31:33 +08:00
Alex Shinn
8b4acbcf71
Merge pull request #530 from Oxyd/win-fixes
Fix tests on Windows
2019-03-14 21:19:11 +08:00