marler8997 / ziglibc

193 stars 19 forks source link

Implement getenv for non-Windows OSes #15

Open mgord9518 opened 1 year ago

mgord9518 commented 1 year ago

As Windows does not have a populated environ of U8s, it'll take a slightly different solution. I did some looking at the Zig stdlib os.getenv, and it uses the 0 byte to find the end of the environment variable, along with environ being a slice of [:0]const u8, so I have no clue why it isn't returned as [:0]const u8. Might be an issue in os.getenv