Print this page
first round of POSIX 2008 stuff

Split Close
Expand all
Collapse all
          --- old/usr/src/head/signal.h
          +++ new/usr/src/head/signal.h
↓ open down ↓ 23 lines elided ↑ open up ↑
  24   24  
  25   25  
  26   26  /*
  27   27   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28   28   * Use is subject to license terms.
  29   29   */
  30   30  
  31   31  #ifndef _SIGNAL_H
  32   32  #define _SIGNAL_H
  33   33  
  34      -#pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.5.3.4 */
  35      -
  36   34  #include <sys/feature_tests.h>
  37   35  
  38   36  #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
  39   37          defined(__XOPEN_OR_POSIX)
  40   38  #include <sys/types.h>  /* need pid_t/uid_t/size_t/clock_t/caddr_t/pthread_t */
  41   39  #endif
  42   40  
  43   41  #include <iso/signal_iso.h>
  44   42  #include <sys/signal.h>
  45   43  
↓ open down ↓ 5 lines elided ↑ open up ↑
  51   49  using std::sig_atomic_t;
  52   50  using std::signal;
  53   51  using std::raise;
  54   52  #endif
  55   53  
  56   54  #ifdef  __cplusplus
  57   55  extern "C" {
  58   56  #endif
  59   57  
  60   58  
  61      -#if defined(__STDC__)
  62      -
  63   59  extern const char       **_sys_siglistp;        /* signal descriptions */
  64   60  extern const int        _sys_siglistn;          /* # of signal descriptions */
  65   61  
  66   62  #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
  67   63  #define _sys_siglist    _sys_siglistp
  68   64  #define _sys_nsig       _sys_siglistn
  69   65  #endif
  70   66  
  71   67  #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
  72   68          defined(__XOPEN_OR_POSIX)
↓ open down ↓ 18 lines elided ↑ open up ↑
  91   87  #include <sys/procset.h>
  92   88  extern int gsignal(int);
  93   89  extern int (*ssignal(int, int (*)(int)))(int);
  94   90  extern int sigsend(idtype_t, id_t, int);
  95   91  extern int sigsendset(const procset_t *, int);
  96   92  extern int sig2str(int, char *);
  97   93  extern int str2sig(const char *, int *);
  98   94  #define SIG2STR_MAX     32
  99   95  #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC)... */
 100   96  
 101      -#if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \
 102      -        !defined(__XOPEN_OR_POSIX)) || defined(_XPG4_2)
       97 +/* Added in Issue 4 version 2, obsoleted in Issue 6 and removed in Issue 7 */
       98 +#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG7))
       99 +/* bsd_signal removed from Issue 7 */
 103  100  extern void (*bsd_signal(int, void (*)(int)))(int);
      101 +#endif
      102 +
      103 +/* Added in Issue 4 version 2 */
      104 +#if (!defined(_STRICT_SYMBOLS)) || defined(_XPG4_2)
 104  105  extern int killpg(pid_t, int);
 105  106  extern int siginterrupt(int, int);
 106  107  extern int sigaltstack(const stack_t *_RESTRICT_KYWD, stack_t *_RESTRICT_KYWD);
 107  108  extern int sighold(int);
 108  109  extern int sigignore(int);
 109  110  extern int sigpause(int);
 110  111  extern int sigrelse(int);
 111  112  extern void (*sigset(int, void (*)(int)))(int);
 112      -#endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && ... */
      113 +#endif
 113  114  
 114      -/* Marked as LEGACY in SUSv2 and removed in SUSv3 */
 115      -#if defined(__EXTENSIONS__) || \
 116      -        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 117      -        (defined(_XPG4_2) && !defined(_XPG6))
      115 +/* Added in Issue 4 version 2, obsoleted in SUSv2 and removed in SUSv3 */
      116 +#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG6))
 118  117  extern int sigstack(struct sigstack *, struct sigstack *);
 119  118  #endif
 120  119  
 121  120  #if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \
 122  121          !defined(__XOPEN_OR_POSIX)) || (_POSIX_C_SOURCE > 2)
 123  122  #include <sys/siginfo.h>
 124  123  #include <time.h>
 125  124  extern int pthread_kill(pthread_t, int);
 126  125  extern int pthread_sigmask(int, const sigset_t *_RESTRICT_KYWD,
 127  126          sigset_t *_RESTRICT_KYWD);
 128  127  extern int sigwaitinfo(const sigset_t *_RESTRICT_KYWD,
 129  128          siginfo_t *_RESTRICT_KYWD);
 130  129  extern int sigtimedwait(const sigset_t *_RESTRICT_KYWD,
 131  130          siginfo_t *_RESTRICT_KYWD, const struct timespec *_RESTRICT_KYWD);
 132  131  extern int sigqueue(pid_t, int, const union sigval);
 133  132  #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && */
 134  133  
 135      -#else   /* __STDC__ */
 136      -
 137      -extern char     **_sys_siglistp;        /* signal descriptions */
 138      -extern int      _sys_siglistn;          /* # of signal descriptions */
 139      -
 140      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
 141      -#define _sys_siglist    _sys_siglistp
 142      -#define _sys_nsig       _sys_siglistn
 143      -#endif
 144      -
 145      -#if defined(__EXTENSIONS__) || defined(__XOPEN_OR_POSIX)
 146      -extern int kill();
 147      -extern int sigaction();
 148      -#ifndef _KERNEL
 149      -extern int sigaddset();
 150      -extern int sigdelset();
 151      -extern int sigemptyset();
 152      -extern int sigfillset();
 153      -extern int sigismember();
 154      -#endif
 155      -extern int sigpending();
 156      -extern int sigprocmask();
 157      -extern int sigsuspend();
 158      -#endif /* defined(__EXTENSIONS__)... */
 159      -
 160      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 161      -        defined(_XPG4_2)
 162      -extern void (*bsd_signal())();
 163      -extern int killpg();
 164      -extern int siginterrupt();
 165      -#endif /* defined(__EXTENSIONS__) ... */
 166      -
 167      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 168      -        (defined(_XPG4_2) && !defined(_XPG6))
 169      -extern int sigstack();
 170      -#endif
 171      -
 172      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
 173      -extern int gsignal();
 174      -extern int (*ssignal)();
 175      -extern int sigsend();
 176      -extern int sigsendset();
 177      -extern int sig2str();
 178      -extern int str2sig();
 179      -#define SIG2STR_MAX     32
 180      -#endif
 181      -
 182      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 183      -        defined(_XPG4_2)
 184      -extern int sigaltstack();
 185      -extern int sighold();
 186      -extern int sigignore();
 187      -extern int sigpause();
 188      -extern int sigrelse();
 189      -extern void (*sigset())();
 190      -#endif
 191      -
 192      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 193      -        (_POSIX_C_SOURCE > 2)
 194      -#include <sys/siginfo.h>
 195      -#include <sys/time.h>
 196      -extern int pthread_kill();
 197      -extern int pthread_sigmask();
 198      -extern int sigwaitinfo();
 199      -extern int sigtimedwait();
 200      -extern int sigqueue();
 201      -#endif
 202      -
 203      -#endif  /* __STDC__ */
 204      -
 205  134  /*
 206  135   * sigwait() prototype is defined here.
 207  136   */
 208  137  
 209  138  #if     defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \
 210  139          !defined(__XOPEN_OR_POSIX)) || (_POSIX_C_SOURCE - 0 >= 199506L) || \
 211  140          defined(_POSIX_PTHREAD_SEMANTICS)
 212  141  
 213      -#if     defined(__STDC__)
 214      -
 215  142  #if     (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
 216  143  
 217  144  #ifdef __PRAGMA_REDEFINE_EXTNAME
 218  145  #pragma redefine_extname sigwait __posix_sigwait
 219  146  extern int sigwait(const sigset_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
 220  147  #else  /* __PRAGMA_REDEFINE_EXTNAME */
 221  148  
 222  149  extern int __posix_sigwait(const sigset_t *_RESTRICT_KYWD,
 223  150      int *_RESTRICT_KYWD);
 224  151  
↓ open down ↓ 9 lines elided ↑ open up ↑
 234  161  
 235  162  #endif /* !__lint */
 236  163  #endif /* __PRAGMA_REDEFINE_EXTNAME */
 237  164  
 238  165  #else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 239  166  
 240  167  extern int sigwait(sigset_t *);
 241  168  
 242  169  #endif  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 243  170  
 244      -
 245      -#else  /* __STDC__ */
 246      -
 247      -
 248      -#if     (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
 249      -
 250      -#ifdef __PRAGMA_REDEFINE_EXTNAME
 251      -#pragma redefine_extname sigwait __posix_sigwait
 252      -extern int sigwait();
 253      -#else  /* __PRAGMA_REDEFINE_EXTNAME */
 254      -
 255      -extern int __posix_sigwait();
 256      -
 257      -#ifdef  __lint
 258      -#define sigwait __posix_sigwait
 259      -#else   /* !__lint */
 260      -
 261      -static int
 262      -sigwait(__setp, __signo)
 263      -        sigset_t *__setp;
 264      -        int *__signo;
 265      -{
 266      -        return (__posix_sigwait(__setp, __signo));
 267      -}
 268      -
 269      -#endif /* !__lint */
 270      -#endif /* __PRAGMA_REDEFINE_EXTNAME */
 271      -
 272      -#else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 273      -
 274      -extern int sigwait();
 275      -
 276      -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 277      -
 278      -#endif /* __STDC__ */
 279      -
 280  171  #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */
 281  172  
 282  173  #ifdef  __cplusplus
 283  174  }
 284  175  #endif
 285  176  
 286  177  #endif  /* _SIGNAL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX