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

Split Close
Expand all
Collapse all
          --- old/usr/src/head/stdlib.h
          +++ new/usr/src/head/stdlib.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  
  22   22  /*
  23   23   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24   24   * Copyright (c) 2013 Gary Mills
  25   25   *
  26   26   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  27   27   */
  28   28  
  29   29  /*
  30   30   * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  31      - * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
       31 + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  32   32   */
  33   33  
  34   34  /*      Copyright (c) 1988 AT&T */
  35   35  /*        All Rights Reserved   */
  36   36  
  37   37  #ifndef _STDLIB_H
  38   38  #define _STDLIB_H
  39   39  
  40   40  #include <iso/stdlib_iso.h>
  41   41  #include <iso/stdlib_c99.h>
↓ open down ↓ 201 lines elided ↑ open up ↑
 243  243  
 244  244  #if defined(__EXTENSIONS__) || \
 245  245          (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 246  246          defined(_XPG6)
 247  247  extern int posix_memalign(void **, size_t, size_t);
 248  248  extern int posix_openpt(int);
 249  249  extern int setenv(const char *, const char *, int);
 250  250  extern int unsetenv(const char *);
 251  251  #endif
 252  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 +
 253  266  #if defined(__EXTENSIONS__) || \
 254  267          (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 255  268  extern char *canonicalize_file_name(const char *);
 256  269  extern int clearenv(void);
 257  270  extern void closefrom(int);
 258  271  extern int daemon(int, int);
 259  272  extern int dup2(int, int);
 260  273  extern int dup3(int, int, int);
 261  274  extern int fdwalk(int (*)(void *, int), void *);
 262  275  extern char *qecvt(long double, int, int *, int *);
↓ open down ↓ 59 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX