Bug 238672 - char **environ should be declared in some system header (?)
Summary: char **environ should be declared in some system header (?)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2019-06-17 22:16 UTC by Yuri Victorovich
Modified: 2019-07-04 11:07 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2019-06-17 22:16:28 UTC
Currently the man man page doesn't mention any header to include for 'environ':
>      environ — user environment
>      extern char **environ;

Shouldn't there be a header where it is declared?
Comment 1 Tijl Coosemans freebsd_committer 2019-07-04 11:07:01 UTC
No, it "must be declared by the user if it is to be used directly," according to https://pubs.opengroup.org/onlinepubs/9699919799/functions/environ.html.  Perhaps the man page should make that more clear.