Commit Graph

4181 Commits

Author SHA1 Message Date
Marcio Giaxa
2e08bd6be4
ci: update freebsd manifest 2018-12-28 15:36:43 -02:00
Marcio Giaxa
4ff23b668a
tests: remove freebsd from the test matrix
- Manually add all the native tests to CI manifest.
2018-12-28 11:38:58 -02:00
Andrew Kelley
c464ecf3bf
Merge pull request #1857 from vegecode/boolean-switch
Switching on bools with duplicate and missing value detection: Issue …
2018-12-27 18:14:33 -05:00
alexander
64061cc1bf Test cases for compiler error and working behavior for switching on booleans 2018-12-27 13:46:32 -06:00
Andrew Kelley
aaef6259c3
allow not having libc include paths and doing @cImport 2018-12-26 20:44:06 -05:00
Marcio Giaxa
c29cae76b0
tests: add FreeBSD to the test matrix 2018-12-26 22:44:13 -02:00
Andrew Kelley
2b7e29f791
Merge branch 'nebulaeonline-nebulaeonline'
Zig gains the UEFI OS target
2018-12-26 15:26:53 -05:00
Andrew Kelley
a918ce26b8
fixups 2018-12-26 15:25:54 -05:00
alexander
4a1f0e1418 Switching on bools with duplicate and missing value detection: Issue 1768 2018-12-26 10:44:25 -06:00
nebulaeonline
f49b45b00f tabs to space fix. thanks visual studio. 2018-12-24 14:01:35 -05:00
Marcio Giaxa
52be7d7404 freebsd: fix flags for opening files
Prior to this fix, the compare-outputs test suite was showing a strange
behavior, the tests always stopped between tests 6-8 and had a stack track
similar to each other.

```
Test 8/68 compare-output multiple files with private function (ReleaseSmall)...OK
/usr/home/mgxm/dev/zig/zig-cache/source.zig:7:2: error: invalid token: '&'
}&(getStdOut() catch unreachable).outStream().stream;
 ^
The following command exited with error code 1:

```

With the wrong O_* flags, the source code was being written in append mode which
resulted in an invalid file

```zig
use @import("foo.zig");
use @import("bar.zig");

pub fn main() void {
	foo_function();
	bar_function();
}&(getStdOut() catch unreachable).outStream().stream;
	stdout.print("OK 2\n") catch unreachable;
}

fn privateFunction() void {
	printText();
}
```
2018-12-24 11:45:55 -02:00
nebulaeonline
28cd337d1f fixed formatting in options display 2018-12-24 07:49:15 -05:00
Marcio Giaxa
de473d4423
freebsd: implement std.os.time.sleep 2018-12-24 10:27:08 -02:00
nebulaeonline
7dcee99510 fixed stricmp/strcasecmp between windows/posix 2018-12-23 23:59:59 -05:00
nebulaeonline
51baea184b Yet another git user error remnant fixed 2018-12-23 23:46:45 -05:00
nebulaeonline
480061d2c9 git user error fix 2018-12-23 23:09:07 -05:00
nebulaeonline
e0af3d7b50 Merge branch 'nebulaeonline' of https://github.com/nebulaeonline/zig into nebulaeonline 2018-12-23 22:56:20 -05:00
nebulaeonline
fdea12b2d9 msvc subsystem option handling; added uefi os type 2018-12-23 22:44:02 -05:00
nebulaeonline
39d32ee40a Altered SUBSYSTEM option handling when linking in msvc mode; Added preliminary UEFI support. 2018-12-23 22:21:32 -05:00
Marcio Giaxa
682815f6e9
freebsd: remove syscall and use libc
Use libc interface for:
 - getdents
 - kill
 - openat
 - setgid
 - setuid
2018-12-23 23:30:31 -02:00
Marcio Giaxa
773bf80133 Merge branch 'master' into fbsd2 2018-12-23 23:21:59 -02:00
Andrew Kelley
280187031a
tests: make type info tests not depend on builtin.Os enum 2018-12-23 18:03:22 -05:00
Andrew Kelley
45081c1e9c
hello world example can use const instead of var 2018-12-23 13:57:37 -05:00
Andrew Kelley
218a4d4b30
comptime: ability to @ptrCast to an extern struct and read fields 2018-12-22 23:06:30 -05:00
Andrew Kelley
f301474531
self-hosted: add DeviceBusy as a BuildError 2018-12-21 23:01:21 -05:00
Andrew Kelley
0eba5b6744
I observed open() return EBUSY on linux
when trying to open for writing a tty fd that is already opened with
screen
2018-12-21 19:50:21 -05:00
Marcio Giaxa
c26f543970
freebsd: fix Stat mode type 2018-12-21 15:04:55 -02:00
Andrew Kelley
56fedbb524
translate-c: --verbose-cimport prints clang command 2018-12-20 19:56:24 -05:00
Marcio Giaxa
c156d51d55
freebsd: remove system linker hack 2018-12-20 21:44:18 -02:00
Marcio Giaxa
a6f33e3dc5
freebsd: add realpath to freebsd/index.zig 2018-12-20 21:05:31 -02:00
Marcio Giaxa
46a0f60e4c
freebsd: use realpath() to resolve symbolic links 2018-12-20 20:57:58 -02:00
Marcio
ac1b2a3c73
Merge pull request #1 from myfreeweb/fbsd2
Fix dirent/stat, add preadv
2018-12-20 22:55:14 +00:00
Greg V
76efc462e7 Add preadv/pwritev on FreeBSD 2018-12-20 23:55:44 +03:00
Greg V
054c7ab18a Fix stat/timespec definitions for FreeBSD 2018-12-20 23:54:09 +03:00
myfreeweb
fa6c7c1303 Use Ninja in .builds/freebsd.yml
It's faster and doesn't require manually getting the number of CPUs
2018-12-20 15:15:25 -05:00
tgschultz
f35ba34a88 Removed allocator from Linux version DynLib. Added dynamic_library.zig to std test list. 2018-12-20 14:49:34 -05:00
Andrew Kelley
8cf3543c80
Merge branch 'mgxm-srtht_fbsd' 2018-12-20 14:18:22 -05:00
Andrew Kelley
2a776ed8a8
ci: only run the debug behavior tests for FreeBSD 2018-12-20 14:18:02 -05:00
Marcio Giaxa
4840600988
ci: add sr.ht build manifest for FreeBSD 2018-12-20 12:40:05 -05:00
Andrew Kelley
459045aa40
Merge branch 'kristate-zig-backport-issue1832' 2018-12-20 12:36:30 -05:00
Andrew Kelley
0f54194e6a
fixups 2018-12-20 12:36:15 -05:00
kristopher tate
fb81b1978b
tests: re: 79db394;
ref: ziglang/zig#1832
2018-12-20 22:53:54 +09:00
kristopher tate
39567e8b50
src/analyze.cpp: support alignOf(struct T) aligned member inside struct T;
ref: ziglang/zig#1832
2018-12-20 22:53:54 +09:00
Andrew Kelley
8768816d69
std.io: call the idiomatic std.mem.readInt functions
I originally called the Slice variants to work around
comptime code not supporting `@ptrCast`, but I fixed that
in 757d0665 so now the workaround is no longer needed.
2018-12-19 17:48:21 -05:00
Marcio Giaxa
e5b4748101 freebsd: initial stack trace
Stack trace is partially working, with only a few symbols missing. Uses
the same functions that we use in Linux to get the necessary debug info.
2018-12-19 18:42:00 -02:00
Marcio Giaxa
9900f94afe freebsd: use sysctl to get the current executable path
FreeBSD doesn't mount procfs as default on the base system, so we can't
depend on it to get the current path, In this case, we use sysctl(3) to
retrieves the system information and get the same information.

 - CTL_KERN: High kernel limits

 - KERN_PROC: Return selected information about specific running
   processes.

 - KERN_PROC_PATHNAME: The path of the process

 - Process ID: a process ID of -1 implies the current process.
2018-12-19 18:42:00 -02:00
Marcio Giaxa
1811e7e6c9 freebsd: remove getrandom dependency from libc
The system call getrandom(2) just landed on FreeBSD 12, so if we want to
support some earlier version or at least FreeBSD 11, we can't depend on
the system call.
2018-12-19 18:42:00 -02:00
Marcio Giaxa
11ced4f99d freebsd: use libc interface instead system calls
Remove all syscalls references

 * dup2()
 * chdir()
 * execve()
 * fork()
 * getcwd()
 * isatty()
 * readlink()
 * mkdir()
 * mmap()
 * munmap()
 * read()
 * rmdir()
 * symlink()
 * pread()
 * write()
 * pwrite()
 * rename()
 * open()
 * close()
 * lseek()
 * exit()
 * unlink()
 * waitpid()
 * nanosleep()
 * setreuid()
 * setregid()
 * raise()
 * fstat()
 * pipe()
 * added pipe2() extern c fn
2018-12-19 18:42:00 -02:00
Marcio Giaxa
6cfcdbde2b freebsd: link against libc++
All supported versions of FreeBSD have libc++ in the base system.
2018-12-19 18:42:00 -02:00
Marcio Giaxa
1fc56b82ad freebsd: link against libc
Since the stable kernel ABI is through libc #1759
2018-12-19 18:42:00 -02:00