Andrew Kelley
67726e36b0
extract posix functions from std/os.zig to std/os/posix.zig
...
See #2380
2019-05-26 18:32:40 -04:00
emekoi
66f3ef06e8
fixed syntax error
2019-04-27 11:16:33 -04:00
Andrew Kelley
1d09cdaa6a
munmap allows address 0
...
fixes test suite regression on macOS from previous commit
2019-03-25 16:04:25 -04:00
Andrew Kelley
e402455704
rename std lib files to new convention
2019-03-02 16:46:04 -05:00
Andrew Kelley
71d7100aa8
darwin: fix pointer cast in mmap
2019-02-14 23:38:14 -05:00
Jimmi Holst Christensen
8139c5a516
New Zig formal grammar ( #1685 )
...
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
Andrew Kelley
2b395d4ede
remove @minValue,@maxValue; add std.math.minInt,maxInt
...
closes #1466
closes #1476
2018-10-26 15:01:51 -04:00
Jimmi Holst Christensen
378d3e4403
Solve the return type ambiguity ( #1628 )
...
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley
fd50a6896b
std.event.fs support for macos
...
The file I/O stuff is working, but the fs watching
stuff is not yet.
2018-08-07 00:49:09 -04:00
Andrew Kelley
2c9ed664dd
merge @kristate's std lib changes to darwin
2018-08-06 19:36:31 -04:00
Andrew Kelley
20f286f22a
re-organize std lib darwin files
2018-07-22 00:04:24 -04:00
kristopher tate
7ef110b484
std.os.posix: Add AF_* for darwin;
...
Tracking issue #1271 ;
2018-07-21 19:14:14 +09:00
Andrew Kelley
a0c564d762
zig fmt
2018-07-09 01:23:47 -04:00
Andrew Kelley
04d3da4bd1
std.os.cpuCount implementation for macos
2018-07-09 01:08:33 -04:00
Andrew Kelley
50d70d5f49
tests passing with kqueue on macos
2018-07-08 02:46:10 -04:00
Andrew Kelley
7912061226
remove integer and float casting syntax
...
* add `@intCast`
* add `@floatCast`
* add `@floatToInt`
* add `@intToFloat`
See #1061
2018-06-17 02:57:07 -04:00
Andrew Kelley
652f4bdf62
disallow unknown-length pointer to opaque
...
This also means that translate-c has to detect when a pointer to
opaque is happening, and use `*` instead of `[*]`.
See #1059
2018-06-05 18:03:21 -04:00
Andrew Kelley
96164ce613
disallow single-item pointer indexing
...
add pointer arithmetic for unknown length pointer
2018-06-04 01:39:57 -04:00
Andrew Kelley
fcbb7426fa
use * for pointer type instead of &
...
See #770
To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.
This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
2018-05-31 17:28:07 -04:00
Andrew Kelley
ea58f4a5a9
run zig fmt on the codebase
2018-05-30 16:09:11 -04:00
Andrew Kelley
0c16cd2d0e
run zig fmt on the codebase
...
See #1003
2018-05-29 04:23:38 -04:00
Andrew Kelley
288fc3a8d3
convert more std lib files to postfix pointer deref
2018-05-16 00:43:28 -04:00
Andrew Kelley
b21bcbd775
fix std threads for macos
2018-04-29 02:52:04 -04:00
Andrew Kelley
0dcadc61b4
Merge branch 'std.os.time' of https://github.com/tgschultz/zig into tgschultz-std.os.time
2018-04-22 13:24:25 -04:00
tgschultz
bf9cf28322
Fixed compiler errors around darwin code.
2018-04-18 15:46:50 -05:00
tgschultz
8b66dd8c7d
Added unstaged changes.
2018-04-18 13:55:42 -05:00
Marc Tiehuis
03bec631bd
Replace File.exists with File.access
2018-04-13 21:27:09 +12:00
Andrew Kelley
e85a10e9f5
async tcp server proof of concept
2018-04-09 00:52:45 -04:00
Andrew Kelley
f5b43ada46
std/os: getting dir entries works on OS X
2018-03-28 12:06:48 +02:00
Andrew Kelley
3671582c15
syntax: functions require return type. remove ->
...
The purpose of this is:
* Only one way to do things
* Changing a function with void return type to return a possible
error becomes a 1 character change, subtly encouraging
people to use errors.
See #632
Here are some imperfect sed commands for performing this update:
remove arrow:
```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```
add void:
```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```
Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-25 04:10:11 -05:00
Andrew Kelley
4183c6f1a5
move std/debug.zig to a subdirectory
...
self hosted compiler parser tests do some fuzz testing
2017-12-23 22:15:48 -05:00
Andrew Kelley
ea805c5fe7
fix darwin and windows from previous commit
2017-12-22 02:33:39 -05:00
Andrew Kelley
d917815d81
explicitly return from blocks
...
instead of last statement being expression value
closes #629
2017-12-22 00:50:30 -05:00
Andrew Kelley
1ac46fac15
add a std lib test for reading and writing files
...
* fix fstat wrong on darwin
* move std.debug.global_allocator to std.debug.global_allocator_state and make it private
* add std.debug.global_allocator as a pointer (to upgrade your zig code remove
the '&')
2017-11-10 14:17:23 -05:00
Jeff Fowler
336d81894d
Fix Stat include in darwin land ( #605 )
2017-11-09 13:46:53 -05:00
Jeff Fowler
52521d5f67
fix typo on darwin lseek ( #602 )
2017-11-09 11:35:35 -05:00
Snorre
522b431057
fix isatty for macOS and libc ( #523 )
2017-10-03 09:33:30 -04:00
Andrew Kelley
768af66977
implement setreuid, setregid for darwin
2017-09-26 03:35:33 -04:00
Andrew Kelley
751ab72a82
std: fix os.sleep on darwin and windows
2017-09-19 09:46:41 -04:00
Andrew Kelley
a81e516174
fix ChildProcess.spawn on darwin
2017-09-08 00:04:43 -04:00
Andrew Kelley
816689a3b1
ptrCast gives compile error for increasing alignment
...
See #37
2017-08-29 16:52:31 -04:00
Andrew Kelley
ebdc6b594d
all tests passing in MacOS
...
depends on LLD 5.0.0 with 3 patches
See #273
2017-08-27 17:16:42 -04:00
Andrew Kelley
5fd579a51c
macos passing all tests except for building a shared library
...
see #273
2017-08-27 05:44:03 -04:00
Andrew Kelley
ff2c794612
all behavior tests passing for macos
...
See #273
2017-08-27 05:15:24 -04:00
Andrew Kelley
29a418c9d5
progress toward tests passing on MacOS
2017-08-27 00:11:09 -04:00
Andrew Kelley
17b935325e
@import("builtin")
instead of @compileVar
...
See #226
Closes #220
2017-05-01 13:12:38 -04:00
Andrew Kelley
e3c524c1d4
rename @ptrcast
to @ptrCast
to follow convention
2017-04-21 10:39:13 -04:00
Andrew Kelley
55dd2676ef
fix std build for darwin
2017-04-03 19:30:03 -04:00
Andrew Kelley
c400cb429a
zig build system: add setLinkerScript and setTarget
...
* See #204 - zig build system
* allow builtin types Os, Environ, Arch to be used at runtime.
they have zero_bits=false and debug info now.
* Eradicate use of `@alloca` in std for syscalls. See #225
* add `std.io.writeFile`
* `std.debug.panic` adds a newline to format
2017-04-03 05:04:46 -04:00
Andrew Kelley
8fd0fddce5
zig build system progress
...
* In-progress os.ChildProcess.spawn implementation. See #204
* Add explicit cast from integer to error. Closes #294
* fix casting from error to integer
* fix compiler crash when initializing variable to undefined
with no type
2017-04-02 18:19:59 -04:00