Matthew Flatt
f741208b77
rktio: another Windows pipe repair
2017-06-19 06:45:19 -06:00
Matthew Flatt
cdf22f7cdd
rktio: fix incorrect uses of errno
...
Using `errno` is not right for Winsock.
2017-06-19 06:45:19 -06:00
Matthew Flatt
8449470db4
rktio: restore early SIGCHLD blocking to support Linux
...
Process handling relies on SIGCHLD being blocked, but signals are
blocked per-thread in Linux, so SIGCHLD needs to be blocked before new
threads are created.
2017-06-19 06:45:19 -06:00
Matthew Flatt
8d857245a4
rktio: fix normalization of envvar names on Windows
2017-06-19 06:45:19 -06:00
Matthew Flatt
4250d51f08
rktio: more text-mode repairs
2017-06-19 06:45:18 -06:00
Matthew Flatt
b96fc45133
rktio: make append mode imply can-exist on Windows
2017-06-19 06:45:18 -06:00
Matthew Flatt
a13bfd25d0
rktio: reset non-blocking on sockets after dup
...
On Linux, is appears that duping a socket doesn't give the
new one the same non-blocking option as the original.
2017-06-19 06:45:18 -06:00
Matthew Flatt
c1416d07d6
rktio: fix Unix file copy to copy permissions
2017-06-19 06:45:18 -06:00
Matthew Flatt
c0275b37d5
rktio: fix text mode (for Windows)
2017-06-19 06:45:18 -06:00
Matthew Flatt
20e23902ba
rktio: simplify Windoes 98 pipe writer
...
This code is unlikely to get used, but make sure it runs just
in case Racket otherwise works on Windows 95/98.
2017-06-19 06:45:18 -06:00
Matthew Flatt
dacdf64f59
rktio: fix eventmask handling (for Windows)
2017-06-19 06:45:18 -06:00
Matthew Flatt
36ca1361d9
rktio: normalize 'replace and 'truncate/replace behavior
...
For `open-output-file`:
Move 'replace mode handling out of rktio and into the client.
Formerly, on Windows, 'replace mode was just 'truncate with a fallback
for permission problems, so this change makes it delete an existing
file and replace it, which is more consistent with how 'replace has
always worked on Unix.
In 'truncate/replace mode, if a truncating open fails due to a
permission error and the file exists, then try again as a 'replace.
That's how it worked on Windows before, and now it's how Unix works.
2017-06-19 06:45:18 -06:00
Matthew Flatt
5d68ec297a
rktio: repair for Windows fs-change
...
Also, add stress mode to rktio demo.
2017-06-19 06:45:18 -06:00
Matthew Flatt
ffc749f29e
rktio: repairs for Windows
2017-06-19 06:45:18 -06:00
Matthew Flatt
6123b31064
rktio: fix non-Windows date timezone
2017-06-19 06:45:18 -06:00
Matthew Flatt
193e6cb518
librktio: more Windoes fixes
...
Now passes rktio tests and builds Racket 3m, but crashes with places.
2017-06-19 06:45:18 -06:00
Matthew Flatt
1e0a55cc8f
rktio: repairs for Windows
...
Might break other systems...
2017-06-19 06:45:18 -06:00
Matthew Flatt
773050805b
rktio: switch demo to use rktio_pipe
2017-06-19 06:45:18 -06:00
Matthew Flatt
e445051790
rktio: update some source notes
2017-06-19 06:45:18 -06:00
Matthew Flatt
38a5e7aacd
rktio: repairs for SOME_FDS_ARE_NOT_SELECTABLE
...
... as set for Solaris, but no idea whether it's
still needed there.
2017-06-19 06:45:18 -06:00
Matthew Flatt
7fe2c1cadf
rktio: repair for --enable-shared
2017-06-19 06:45:18 -06:00
Matthew Flatt
a3725374ca
rktio: repair for UDP disconnect
2017-06-19 06:45:18 -06:00
Matthew Flatt
58f463ee1d
rktio: repairs for non-places, non-futures build
2017-06-19 06:45:18 -06:00
Matthew Flatt
46908c377c
rktio: fix MinGW compilation
2017-06-19 06:45:18 -06:00
Matthew Flatt
c02eacd5d2
rktio: repairs to kqueue-based fs-change events
2017-06-19 06:45:18 -06:00
Matthew Flatt
a1cf37eb0f
rktio: repairs
2017-06-19 06:45:18 -06:00
Matthew Flatt
d34fcc31db
rktio: repairs for various configurations
2017-06-19 06:45:18 -06:00
Matthew Flatt
35d47f89f6
rktio: repairs for Linux
2017-06-19 06:45:18 -06:00
Matthew Flatt
8a426eb086
rktio: configure
fixes
2017-06-19 06:45:18 -06:00
Matthew Flatt
dff32444ea
rktio: remove migrated configure
elements
2017-06-19 06:45:18 -06:00
Matthew Flatt
d72a04285d
rktio: remove obsolete preprocessor definitions
...
Many have moved to rktio, and others became irrelevant
over the decades.
2017-06-19 06:45:17 -06:00
Matthew Flatt
c4b3b19c1e
rktio: repairs
...
All tests now pass for MacOS.
2017-06-19 06:45:17 -06:00
Matthew Flatt
463862d793
rktio: repairs
...
More tests pass.
2017-06-19 06:45:17 -06:00
Matthew Flatt
99c3643033
rktio: repairs
...
Builds and starts on MacOS.
2017-06-19 06:45:17 -06:00
Matthew Flatt
f0a644990c
rktio: repairs
...
Compiles ons MacOS, but doesn't quite link.
2017-06-19 06:45:17 -06:00
Matthew Flatt
93834adc99
rktio: move udp over to rktio
...
Still doesn't work...
2017-06-19 06:45:17 -06:00
Matthew Flatt
2b439fc554
rktio: most of switch to rktio fd
...
Doesn't work, yet...
2017-06-19 06:45:17 -06:00
Matthew Flatt
63505d3e16
rktio: switch to rktio envvars
2017-06-19 06:45:17 -06:00
Matthew Flatt
49e30ea6fb
rktio: better file size and timestamp types
2017-06-19 06:45:17 -06:00
Matthew Flatt
d9d8c7758d
rktio: fix MzCOM projects
2017-06-19 06:45:17 -06:00
Matthew Flatt
2d21523b2d
rktio: fixes for Windows build
2017-06-19 06:45:17 -06:00
Matthew Flatt
75e835351a
rktio: add MSVC projects
2017-06-19 06:45:17 -06:00
Matthew Flatt
6e06329c61
rktio: fix scheme_os_getcwd() wrapper
2017-06-19 06:45:17 -06:00
Matthew Flatt
0402075f2b
rktio: repairs to file & directory operations
2017-06-19 06:45:17 -06:00
Matthew Flatt
6268cd7ce9
rktio: switch file & directory operations to rktio
2017-06-19 06:45:17 -06:00
Matthew Flatt
425fe36fa5
rktio: initial import of librktio to racket
2017-06-19 06:45:16 -06:00
Matthew Flatt
636b1637b4
rktio: add date & time
2017-06-19 06:45:16 -06:00
Matthew Flatt
c006e951f4
rktio: add file locking
2017-06-19 06:45:16 -06:00
Matthew Flatt
03c3655b1f
rktio: more repairs exposed by warnings
2017-06-19 06:45:16 -06:00
Matthew Flatt
2f5797f1d5
rktio: use -Wall
and fix warnings
2017-06-19 06:45:16 -06:00
Matthew Flatt
a929c58712
rktio: compiles for Windows using MinGW
2017-06-19 06:45:16 -06:00
Matthew Flatt
9bfaaf3ab3
rktio: wide-string handling for Windows
2017-06-19 06:45:16 -06:00
Matthew Flatt
4ffb01c6fa
rktio: more configure
for rktio
2017-06-19 06:45:16 -06:00
Matthew Flatt
2187e77e65
rktio: add filesystem-change events
2017-06-19 06:45:16 -06:00
Matthew Flatt
19776f6bb9
rktio: fix some leaks
2017-06-19 06:45:16 -06:00
Matthew Flatt
b5e88e70c2
rktio: environment variables
2017-06-19 06:45:16 -06:00
Matthew Flatt
a767ea38fc
rktio: improve organization
2017-06-19 06:45:16 -06:00
Matthew Flatt
c5ddf79721
rktio: small repairs
2017-06-19 06:45:16 -06:00
Matthew Flatt
9e68886b26
rktio: processes
2017-06-19 06:45:16 -06:00
Matthew Flatt
6c2f71bf80
rktio: UDP
2017-06-19 06:45:16 -06:00
Matthew Flatt
e9d5260295
rktio: dup and socket addresses
2017-06-19 06:45:16 -06:00
Matthew Flatt
9461c0e72a
rktio: repairs for dynamic fd_set support
2017-06-19 06:45:16 -06:00
Matthew Flatt
72b0351331
rktio: repairs for Linux
2017-06-19 06:45:16 -06:00
Matthew Flatt
6e1d519711
rktio: fix network problems
2017-06-19 06:45:16 -06:00
Matthew Flatt
3065773b31
rktio: add networking
2017-06-19 06:45:16 -06:00
Matthew Flatt
adedf861b2
rktio: finish epoll/kqueue layer
2017-06-19 06:45:16 -06:00
Matthew Flatt
04130638fc
rktio: add kqueue/epoll layer
2017-06-19 06:45:16 -06:00
Matthew Flatt
09703b94f7
rktio: put "globals" in an rktio_t
...
Avoid thread-local state by threading a `rktio_t`
record through everything.
2017-06-19 06:45:16 -06:00
Matthew Flatt
68352ef86a
rktio: more progress
2017-06-19 06:45:16 -06:00
Matthew Flatt
64146e94dc
rktio: first cut at moving Racket OS wrappers to a library
...
The world doesn't need yet another cross-platform I/O library, but
it's getting one. This one has exactly the things that Racket needs,
and pulling it out will make it reusable from other VMs while
improving the Racket code organization.
This first step just gets started.
2017-06-19 06:45:16 -06:00
Matthew Flatt
dc14a68162
fix performance problem in expander
...
For a term
(lambda (arg-id ...) (define def-id _rhs) ... (arg-id def-id) ...)
the expander could take quadratic time in the number of `def-id`s
due to walking an environment to remove use-site scopes. (The
variant of the expander rewritten in Racket didn't have this
problem.)
2017-06-08 07:01:31 -06:00
Matthew Flatt
ff26c2f29b
fix complexity of type merging in bytecode optimizer
...
Merge a smaller table into a larger one to avoid an overall
quadratic-time computation.
2017-06-08 07:01:30 -06:00
Leif Andersen
5c27f5550c
Add mzrt_sema_trywait to the mzrt library.
...
This commit add mzrt_sema_try_wait to the functions that operate
on semaphores. The existing ones are:
* int mzrt_sema_create(mzrt_sema **sema, int init);
* int mzrt_sema_post(mzrt_sema *sema);
* int mzrt_sema_wait(mzrt_sema *sema);
* int mzrt_sema_destroy(mzrt_sema *sema);
2017-06-05 10:46:24 -04:00
Leif Andersen
5510a76dca
scheme_add_atexit_closer now uses scheme_atexit.
...
This is because calling atexit is not correct in all
situations, namely on old operating systems.
2017-06-04 08:56:07 -04:00
Leif Andersen
a8fa5d4ebb
Add scheme_atexit c function.
...
This way programs can actually call atexit. (Otherwise atexit
is frequently not provided in libc as a symbol.)
2017-06-03 20:47:34 -04:00
Leif Andersen
2f6c42f3c1
Add a #:make-c-id flag to define-ffi-definer
...
This make-c-id allows an author to specify a convention for how
to connect and identifier defined with define-ffi-definer and
the actual symbol in the file.
* Adds docs.
* Adds tests.
* Adds history.
2017-06-02 10:26:57 -04:00
Matthew Flatt
f459dd9eb7
make collapse-module-path-index
work on a "self" modidx
2017-06-01 19:37:18 -06:00
Matthew Butterick
4c5f66ff4a
fix typo
...
`that do` → `that does`
2017-05-30 11:05:40 -04:00
Matthew Flatt
06b69c625f
repair chainges to ffi/file
...
Bring back the exported `_file/guard`, `_file/r`, and `_file/rw`;
restore/move tests in "file.rktl" test suite; and add docs for new
functions.
2017-05-27 07:29:47 -06:00
Matthew Flatt
87c0ca84a8
add ffi/unsafe/global
and switch openssl
to use it
...
Continues the move away from using the FFI to access unsafe Racket
functionality.
2017-05-26 17:49:16 -06:00
Matthew Flatt
bf83d1126d
add some unsafe operations as an alternative to FFI access
...
Accessing unsafe functionality through the FFI seemed like a good way
to avoid writing C code, but it made things more complicated instead
of easier, and it interacts badly with a more agressive shift away
from C (such as porting to Chez Scheme). So, add functions to the
primitive `#%unsafe` module, instead.
2017-05-26 16:26:06 -06:00
Matthew Flatt
7f1ab90806
raco exe on Mac OS: ensure that "PkgInfo" is writable
...
Relevant to #1680
2017-05-25 13:01:12 -06:00
Matthew Flatt
f27be30c15
fix error message
2017-05-25 13:01:08 -06:00
Jay McCarthy
07f35d248c
Abort if munmap or protect_pages fails
...
On Linux, munmap can fail when you run out of mappable regions.
If protect_pages fails, then you can't install a write barrier
2017-05-25 13:38:33 -04:00
Milo Turner
cc25a27f87
fix id-set-symmetric-difference, same as 4716a6e
fixed for sets
2017-05-24 15:55:03 -04:00
Stephen Chang
7620bfcb7c
fix and actually run id-set tests
2017-05-24 13:25:15 -04:00
Stephen Chang
42152ed31c
add neg-party arg to id-set-contract-check
2017-05-24 10:01:43 -04:00
Robby Findler
6a145244d6
add missing adjust-location call
2017-05-23 09:05:30 -05:00
Ben Greenman
b36c35ac7e
typo: 'an mutable' => 'a mutable'
2017-05-21 02:00:00 -04:00
Ryan Culpepper
c082f130cb
support string, bytes (bindings from racket) as stxclass refs
...
add compile-time table as alternative to stxclass binding
2017-05-18 12:54:26 -04:00
Daniel Feltey
1bdaf0b231
Fix typo for chaperone-vector* error messages
2017-05-17 12:50:05 -05:00
Daniel Feltey
8bc9cef7a9
Fix typo in vector contract implementation leading to wrong error message
2017-05-15 17:33:24 -05:00
Robby Findler
f2a29515d1
adjust invariant-assertion error message to avoid blame
...
closes #1681
2017-05-13 11:12:25 -05:00
Matthew Flatt
f43234e1cb
add prop:authentic
and (struct .... #:authentic ....)
...
An authentic structure type is one whose instances cannot be
impersonated or chaperoned. The intended use of `prop:authentic` is to
annotate a library-private data structure where impersonators are
never needed internally for the data structure, and the declaration
lets the compiler produce less code and fewer branches by omitting
impersonator support.
2017-05-12 12:40:57 -06:00
Robby Findler
65beb4de4c
fix cons/dc's predicate
2017-05-12 11:26:49 -05:00
Robby Findler
8f34b702ab
improve flat-contract test suite so that it checks
...
the predicate-ness of the contracts
2017-05-12 11:26:49 -05:00
Matthew Flatt
e6793c4598
fix variable-reference->module-path-index
on primitive refs
2017-05-09 20:28:25 -06:00
Matthew Flatt
26c4dd6909
add #%unsafe
exports to implement ffi/unsafe/atomic
...
Export functions through the usual `#%unsafe` primitive module,
instead of using the FFI to get at unsafe operations.
2017-05-09 09:32:34 -06:00
Matthew Flatt
e68e4bd6f6
minor configure --help
format repairs
2017-05-09 09:32:34 -06:00
Robby Findler
79cef0a96e
clean up a bunch of contract names
2017-05-06 22:10:41 -05:00