Andrew Kelley
a60f219660
std.c.MAP: use a packed struct
...
Same as previous commit, but for the libc interface.
2024-02-06 22:06:01 -07:00
Andrew Kelley
5f101b253e
Revert "std: adding sigevent to supported platforms."
...
This reverts commit 23c4f55a612842d8544a9dfe604a9caf1ca39697.
2023-07-31 11:20:39 -07:00
Andrew Kelley
c6ec217e23
Revert "std.c: add find_path for haiku"
...
This reverts commit 1084590ec4939ed0aba5574eb835a07783301a8c.
2023-07-31 11:18:19 -07:00
Andrew Kelley
5d345b69ea
Revert "std.fs: selfExePath haiku using constants instead"
...
This reverts commit e21739dd8caf7d6a9aefe68c37eddb6406bcb810.
2023-07-31 11:09:28 -07:00
Andrew Kelley
1b9ffa0824
Revert "std.Thread: refining stack size from platform minimum, changes more targetted towards platform like Linux/musl ( #15791 )"
...
This reverts commit 41502c6aa53a3da31b276c23c4db74db7d04796b.
2023-07-31 10:54:35 -07:00
Andrew Kelley
8e9a33b82c
Revert "Merge pull request #15867 from devnexen/haiku_malloc_usable_size"
...
This reverts commit 3ef91233caf2c637797d84527a4e78f870e4b4b9, reversing
changes made to 2839e35d1c06ca5b6bda1f20ae870f2b2fbbbfb1.
2023-07-31 10:50:48 -07:00
Andrew Kelley
95e2605d30
Revert "std.c: msghdr* struct removing prefixes to match linux."
...
This reverts commit 8f14431bc883898aaf78cc985e2d90716187e882.
2023-07-31 10:49:57 -07:00
Andrew Kelley
66d5f391ea
Revert "std.c: fix haiku's find_path signature."
...
This reverts commit 9e0ac4449a18677ba695f7a75342cbdb049aad52.
2023-07-31 10:49:45 -07:00
David Carlier
9e0ac4449a
std.c: fix haiku's find_path signature.
...
codePointer and subPath are not mandatory.
following up on 1084590
2023-07-01 22:20:21 -07:00
David CARLIER
8f14431bc8
std.c: msghdr* struct removing prefixes to match linux.
2023-07-01 11:14:39 -07:00
mlugg
f26dda2117
all: migrate code to new cast builtin syntax
...
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:
* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
Eric Joldasov
50339f595a
all: zig fmt and rename "@XToY" to "@YFromX"
...
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
David Carlier
a3eb950423
std.c: haiku also supports malloc_usable_size to benefit zig's heap
2023-05-26 12:05:19 +00:00
David CARLIER
41502c6aa5
std.Thread: refining stack size from platform minimum, changes more targetted towards platform like Linux/musl ( #15791 )
2023-05-25 14:32:17 -05:00
David Carlier
e21739dd8c
std.fs: selfExePath haiku using constants instead
2023-05-09 14:24:20 +03:00
David Carlier
1084590ec4
std.c: add find_path for haiku
2023-04-24 12:32:46 +03:00
David CARLIER
23c4f55a61
std: adding sigevent to supported platforms.
2023-04-23 19:46:43 +03:00
Andrew Kelley
cd0d514643
remove the experimental std.x namespace
...
Playtime is over. I'm working on networking now.
2023-01-02 16:57:15 -07:00
Andrew Kelley
50eb7983cd
remove most conditional compilation based on stage1
...
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
2022-12-06 20:38:54 -07:00
Ryan Schneider
7f1f2e653d
std.os: fix alignment of Sigaction.handler_fn
...
Fixes #13216
2022-11-04 08:00:50 -07:00
Ryan Liptak
db80225a97
fs: Some NAME_MAX/MAX_NAME_BYTES improvements
2022-10-29 14:30:46 -07:00
Ryan Liptak
33fdc43714
std.fs: Add MAX_NAME_BYTES
...
Also add some NAME_MAX or equivalent definitions where necessary
2022-10-29 14:30:43 -07:00
ominitay
295451dfe5
std: Replace use of stage1 function pointers
2022-09-29 21:45:30 +03:00
zooster
4055e6055b
AstGen: disallow leading zeroes in int literals and int types
...
This makes `0123` and `u0123` etc. illegal.
I'm now confident that this is a good change because
I actually caught two C header translation mistakes in `haiku.zig` with this.
Clearly, `0123` being octal in C (TIL) can cause confusion, and we make this easier to read by
requiring `0o` as the prefix and now also disallowing leading zeroes in integers.
For consistency and because it looks weird, we disallow it for integer types too (e.g. `u0123`).
Fixes #11963
Fixes #12417
2022-08-18 19:54:51 +03:00
Veikka Tuominen
122c76a167
Sema: allow void as an extern union field & fix invalid extern unions
2022-07-11 20:30:16 +03:00
Andrew Kelley
9c5056788f
std: update bsd bits to new fn ptr semantics
2022-07-04 13:02:30 -07:00
Al Hoang
db82c1b982
add constant for haiku
...
* re-enable zig build on haiku
2022-02-26 10:53:13 +02:00
Anthony Carrico
078aa5f7b2
Adds Linux support for POSIX file locking with fcntl
...
On Linux, locking fails with EAGAIN (vs. EACCES on other systems).
This commit also adds FcntlErrors for EDEADLK and ENOLCK.
2022-02-15 13:22:50 +02:00
ominitay
3dd3c5063b
std.c.haiku: move Stat.crtime to Stat.birthtime
2022-02-13 20:40:44 +00:00
Isaac Freund
9f9f215305
stage1, stage2: rename c_void to anyopaque ( #10316 )
...
zig fmt now replaces c_void with anyopaque to make updating
code easy.
2021-12-19 00:24:45 -05:00
Al Hoang
be541ca5e1
haiku follow up cleanup of constants
2021-11-19 22:04:09 -06:00
Al Hoang
4ec83133e9
haiku constants cleanup and update
2021-11-15 00:29:27 -06:00
Al Hoang
cfb9bf59c1
update mmap flags, use defines
2021-11-15 00:29:27 -06:00
Al Hoang
59e91f4b25
ensure zig fmt
2021-11-15 00:29:27 -06:00
Al Hoang
426f54026b
updates for haiku stdc
...
* add team_info, area_info
* update signature for get_next_image_info
* add error checks for haiku system calls
* update and cleanup of haiku constants
2021-11-15 00:29:26 -06:00
Stephen Gregoratto
506f24cac2
Set the Storage socket sizes to be system defined
...
Some systems (Solaris, OpenBSD, AIX) change their definitions of
sockaddr_storage to be larger than 128 bytes. This comment adds a new
constant in the `sockaddr` that defines the size for every system.
Fixes #9759
2021-09-16 13:32:55 +03:00
Andrew Kelley
0932b0d9b3
std.os reorg: regression fixes to stack_t, and std.Thread
2021-09-01 17:54:07 -07:00
Andrew Kelley
f8dd4b13d6
std.os reorg: more fixes caught by CI
2021-09-01 17:54:07 -07:00
Andrew Kelley
057f0fec33
std.os fixes to get the test suite passing again
2021-09-01 17:54:07 -07:00
Andrew Kelley
cca57042df
std: fix regressions from this branch
...
Also move some usingnamespace test cases from compare_output to
behavior.
2021-09-01 17:54:07 -07:00
Andrew Kelley
c05a20fc8c
std: reorganization that allows new usingnamespace semantics
...
The proposal #9629 is now accepted, usingnamespace stays but no longer
puts identifiers in scope.
2021-09-01 17:54:06 -07:00
Andrew Kelley
7884d84315
std.os.windows: reorg to avoid usingnamespace
...
Down to 19 uses of `usingnamespace`.
2021-09-01 17:54:06 -07:00
Andrew Kelley
7f03cfe161
std.os: more reorganization efforts
...
* std lib tests are passing on x86_64-linux with and without -lc
* stage2 is building from source on x86_64-linux
* down to 38 remaining uses of `usingnamespace`
2021-09-01 17:54:06 -07:00
Andrew Kelley
1bbfcb95ab
std: reorganize std.c to eliminate usingnamespace
...
Behavior tests pass on x86_64-linux with -lc
2021-09-01 17:54:06 -07:00
Andrew Kelley
d29871977f
remove redundant license headers from zig standard library
...
We already have a LICENSE file that covers the Zig Standard Library. We
no longer need to remind everyone that the license is MIT in every single
file.
Previously this was introduced to clarify the situation for a fork of
Zig that made Zig's LICENSE file harder to find, and replaced it with
their own license that required annual payments to their company.
However that fork now appears to be dead. So there is no need to
reinforce the copyright notice in every single file.
2021-08-24 12:25:09 -07:00
Andrew Kelley
474ade88b5
std: fix compile errors found by stage2 AstGen
2021-04-29 20:33:29 -07:00
Al Hoang
762d4a959c
update haiku system constants
2021-04-23 23:40:42 -05:00
Al Hoang
c17396691c
initial support for haiku sync update
...
* add cpu count
* use haiku find_directory
* add definitions and exports for building in haiku
2021-02-25 16:41:42 -07:00
Al Hoang
6b0372229d
initial support for haiku continue clean up
...
* remove unused definitions
* setup os specific blocks
2021-02-25 16:41:42 -07:00
Al Hoang
025635c3f8
initial support for haiku past stage0
2021-02-25 16:41:42 -07:00