diff options
author | Mike Zeller <mike@mikezeller.net> | 2020-03-11 16:42:06 -0400 |
---|---|---|
committer | Mike Zeller <mike@mikezeller.net> | 2020-03-11 16:42:06 -0400 |
commit | 2803e163cd303fbc63f832f544bc59c4ee562252 (patch) | |
tree | c901ef8fa7580dcebfb11316f6bb49d498bd40a8 /usr/src/head | |
parent | dd05dd221f0e26bb86692b7b69c8dbeab8f4c0e5 (diff) | |
parent | 1de02da27664d38cedeccf227bd4ae92d32619d9 (diff) | |
download | illumos-joyent-bhyve-sync.tar.gz |
Merge remote-tracking branch 'origin/master' into bhyve-syncbhyve-sync
Diffstat (limited to 'usr/src/head')
-rw-r--r-- | usr/src/head/getopt.h | 16 | ||||
-rw-r--r-- | usr/src/head/stdlib.h | 15 |
2 files changed, 25 insertions, 6 deletions
diff --git a/usr/src/head/getopt.h b/usr/src/head/getopt.h index adf98d096c..2b72c23ddc 100644 --- a/usr/src/head/getopt.h +++ b/usr/src/head/getopt.h @@ -27,6 +27,10 @@ */ /* + * Copyright 2020 Joyent Inc. + */ + +/* * GNU-like getopt_long(), getopt_long_only(). * Solaris-specific getopt_clip(). */ @@ -49,11 +53,13 @@ extern "C" { #define optional_argument 2 struct option { - char *name; /* name of long option */ - int has_arg; /* whether option takes an argument */ - int *flag; /* if not NULL, set *flag to val when option found */ - int val; /* if flag is not NULL, value to set *flag to. */ - /* if flag is NULL, return value */ + const char *name; /* name of long option */ + int has_arg; /* whether option takes an argument */ + int *flag; /* if not NULL, set *flag to val when option */ + /* found */ + int val; /* if flag is not NULL, value to set *flag */ + /* to. */ + /* if flag is NULL, return value */ }; /* diff --git a/usr/src/head/stdlib.h b/usr/src/head/stdlib.h index 6b0d224e07..337311a978 100644 --- a/usr/src/head/stdlib.h +++ b/usr/src/head/stdlib.h @@ -28,7 +28,7 @@ /* * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. */ /* Copyright (c) 1988 AT&T */ @@ -250,6 +250,19 @@ extern int setenv(const char *, const char *, int); extern int unsetenv(const char *); #endif +/* + * In strict XPG4v2 mode, slave pseudo terminal devices behave differently. + * See the block comment in usr/src/lib/libc/port/gen/pt.c + */ +#if defined(_STRICT_SYMBOLS) && defined(_XPG4_2) +#ifdef __PRAGMA_REDEFINE_EXTNAME +#pragma redefine_extname unlockpt __unlockpt_xpg4 +#else +extern int __unlockpt_xpg4(int); +#define unlockpt __unlockpt_xpg4 +#endif +#endif /* defined(_STRICT_SYMBOLS) && defined(_XPG4_2) */ + #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) extern char *canonicalize_file_name(const char *); |