Print this page
12306 XPG4v2 slave pty behaviour should generally be disabled
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Change-ID: I7ccd399c22866f34dd20c6bb9d28e77ba4e24c67


  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  * Copyright (c) 2013 Gary Mills
  25  *
  26  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  27  */
  28 
  29 /*
  30  * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  31  * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  32  */
  33 
  34 /*      Copyright (c) 1988 AT&T     */
  35 /*        All Rights Reserved   */
  36 
  37 #ifndef _STDLIB_H
  38 #define _STDLIB_H
  39 
  40 #include <iso/stdlib_iso.h>
  41 #include <iso/stdlib_c99.h>
  42 #include <iso/stdlib_c11.h>
  43 
  44 #if defined(__EXTENSIONS__) || defined(_XPG4)
  45 #include <sys/wait.h>
  46 #endif
  47 
  48 /*
  49  * Allow global visibility for symbols defined in
  50  * C++ "std" namespace in <iso/stdlib_iso.h>.
  51  */


 233 extern char *realpath(const char *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
 234 extern char *setstate(const char *);
 235 extern void srandom(unsigned);
 236 extern int  unlockpt(int);
 237 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
 238 #if !defined(_XPG6) || defined(__EXTENSIONS__)
 239 extern int ttyslot(void);
 240 extern void *valloc(size_t);
 241 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
 242 #endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */
 243 
 244 #if defined(__EXTENSIONS__) || \
 245         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 246         defined(_XPG6)
 247 extern int posix_memalign(void **, size_t, size_t);
 248 extern int posix_openpt(int);
 249 extern int setenv(const char *, const char *, int);
 250 extern int unsetenv(const char *);
 251 #endif
 252 













 253 #if defined(__EXTENSIONS__) || \
 254         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 255 extern char *canonicalize_file_name(const char *);
 256 extern int clearenv(void);
 257 extern void closefrom(int);
 258 extern int daemon(int, int);
 259 extern int dup2(int, int);
 260 extern int dup3(int, int, int);
 261 extern int fdwalk(int (*)(void *, int), void *);
 262 extern char *qecvt(long double, int, int *, int *);
 263 extern char *qfcvt(long double, int, int *, int *);
 264 extern char *qgcvt(long double, int, char *);
 265 extern char *getcwd(char *, size_t);
 266 extern const char *getexecname(void);
 267 
 268 #ifndef __GETLOGIN_DEFINED      /* Avoid duplicate in unistd.h */
 269 #define __GETLOGIN_DEFINED
 270 #ifndef __USE_LEGACY_LOGNAME__
 271 #ifdef  __PRAGMA_REDEFINE_EXTNAME
 272 #pragma redefine_extname getlogin getloginx




  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  * Copyright (c) 2013 Gary Mills
  25  *
  26  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  27  */
  28 
  29 /*
  30  * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  31  * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  32  */
  33 
  34 /*      Copyright (c) 1988 AT&T     */
  35 /*        All Rights Reserved   */
  36 
  37 #ifndef _STDLIB_H
  38 #define _STDLIB_H
  39 
  40 #include <iso/stdlib_iso.h>
  41 #include <iso/stdlib_c99.h>
  42 #include <iso/stdlib_c11.h>
  43 
  44 #if defined(__EXTENSIONS__) || defined(_XPG4)
  45 #include <sys/wait.h>
  46 #endif
  47 
  48 /*
  49  * Allow global visibility for symbols defined in
  50  * C++ "std" namespace in <iso/stdlib_iso.h>.
  51  */


 233 extern char *realpath(const char *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
 234 extern char *setstate(const char *);
 235 extern void srandom(unsigned);
 236 extern int  unlockpt(int);
 237 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
 238 #if !defined(_XPG6) || defined(__EXTENSIONS__)
 239 extern int ttyslot(void);
 240 extern void *valloc(size_t);
 241 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
 242 #endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */
 243 
 244 #if defined(__EXTENSIONS__) || \
 245         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 246         defined(_XPG6)
 247 extern int posix_memalign(void **, size_t, size_t);
 248 extern int posix_openpt(int);
 249 extern int setenv(const char *, const char *, int);
 250 extern int unsetenv(const char *);
 251 #endif
 252 
 253 /*
 254  * In strict XPG4v2 mode, slave pseudo terminal devices behave differently.
 255  * See the block comment in usr/src/lib/libc/port/gen/pt.c
 256  */
 257 #if defined(_STRICT_SYMBOLS) && defined(_XPG4_2)
 258 #ifdef  __PRAGMA_REDEFINE_EXTNAME
 259 #pragma redefine_extname unlockpt __unlockpt_xpg4
 260 #else
 261 extern int __unlockpt_xpg4(int);
 262 #define unlockpt __unlockpt_xpg4
 263 #endif
 264 #endif  /* defined(_STRICT_SYMBOLS) && defined(_XPG4_2) */
 265 
 266 #if defined(__EXTENSIONS__) || \
 267         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 268 extern char *canonicalize_file_name(const char *);
 269 extern int clearenv(void);
 270 extern void closefrom(int);
 271 extern int daemon(int, int);
 272 extern int dup2(int, int);
 273 extern int dup3(int, int, int);
 274 extern int fdwalk(int (*)(void *, int), void *);
 275 extern char *qecvt(long double, int, int *, int *);
 276 extern char *qfcvt(long double, int, int *, int *);
 277 extern char *qgcvt(long double, int, char *);
 278 extern char *getcwd(char *, size_t);
 279 extern const char *getexecname(void);
 280 
 281 #ifndef __GETLOGIN_DEFINED      /* Avoid duplicate in unistd.h */
 282 #define __GETLOGIN_DEFINED
 283 #ifndef __USE_LEGACY_LOGNAME__
 284 #ifdef  __PRAGMA_REDEFINE_EXTNAME
 285 #pragma redefine_extname getlogin getloginx