Commit Graph

3 Commits

Author SHA1 Message Date
Andreas Kling
c74e4d0c80 LibC: Pass the environment as third argument to main()
After some very confused debugging, I discovered that GNU make has a
main() function with this signature:

    int main(int argc, char** argv, char** envp)

Apparently this is a non-standard but widely supported thing, so let's
do the same in Serenity so make works as expected.

This fixes an issue where you had to do "make PATH=..." instead of make
just picking up PATH from the environment. :^)
2019-09-12 21:43:32 +02:00
Andreas Kling
af14b8dc59 LibC: Make "errno" thread-specific
Now that the kernel supports thread-local storage, we can declare errno
with the __thread keyword, which causes it to be per-thread.

This should fix all the stupid issues that happen when many threads use
the same errno. :^)
2019-09-07 15:57:02 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00