-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build & getconf fixes for macOS (and UnixWare)
src/lib/libast/features/standards: - Add heuristic (u_long availability) for systems that hide rather than reveal functionality in the presence of _POSIX_SOURCE, etc. - Define _DARWIN_C_SOURCE, like _GNU_SOURCE, to enable the full range of definitions on macOS systems. - Due to the above, remove MACH (macOS)-specific hack. - These changes ported from att#1492 - thanks to Lev Kujawski (@lkujaw). His PR indicates that this fixes the standards macros on UnixWare, too. Therefore, no longer exclude UnixWare from standards macros (re: ff70c27). src/lib/libast/comp/conf.sh: - Promote the 'op' member in Conf_t (struct Conf_s) from short to int. This allows some Darwin/macOS values, now exposed, to fit that would otherwise be truncated, namely: _CS_DARWIN_USER_CACHE_DIR 65538 _CS_DARWIN_USER_DIR 65536 _CS_DARWIN_USER_TEMP_DIR 65537 Thus, the following AST getconf values are now correct on macOS: $ /opt/ast/bin/getconf | grep ^DARWIN DARWIN_USER_CACHE_DIR=/var/folders/nx/(REDACTED)/C/ DARWIN_USER_DIR=/var/folders/nx/(REDACTED)/0/ DARWIN_USER_TEMP_DIR=/var/folders/nx/(REDACTED)/T/ src/lib/libast/features/tty: - Include <sys/ioctl.h> if available. This silences a compiler warning in src/lib/libast/misc/procopen.c about an invalid implicit declaration of ioctl(2).
- Loading branch information
Showing
3 changed files
with
59 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d431900
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkujaw, could you confirm that ksh 93u+m builds correctly on UnixWare after this commit? It gives UnixWare the standards macros again after your fix from att#1492.