home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / incla / process.h__ / PROCESS.H
Encoding:
C/C++ Source or Header  |  1992-09-30  |  6.2 KB  |  144 lines

  1. #ifndef __process_h
  2.    #define __process_h
  3.  
  4.    #pragma info( none )
  5.    #ifndef __CHKHDR__
  6.       #pragma info( none )
  7.    #endif
  8.    #pragma info( restore )
  9.  
  10.    #ifdef __cplusplus
  11.       extern "C" {
  12.    #endif
  13.  
  14.    /********************************************************************/
  15.    /*  <process.h> header file                                         */
  16.    /*                                                                  */
  17.    /*  Licensed Materials - Property of IBM                            */
  18.    /*                                                                  */
  19.    /*  IBM C Set/2 Beta Version                                        */
  20.    /*  Copyright (C) International Business Machines Corp., 1991,1992  */
  21.    /*  All rights reserved                                             */
  22.    /*                                                                  */
  23.    /*  US Government Users Restricted Rights -                         */
  24.    /*  Use, duplication, or disclosure restricted                      */
  25.    /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  26.    /*                                                                  */
  27.    /********************************************************************/
  28.  
  29.    #if defined(__EXTENDED__)
  30.  
  31.       /* Modeflag values for spawnxx routines */
  32.  
  33.       #define P_WAIT          0
  34.       #define P_NOWAIT        1
  35.       #define P_OVERLAY       2
  36.  
  37.       /* Action codes used with cwait() */
  38.  
  39.       #define WAIT_CHILD      0
  40.       #define WAIT_GRANDCHILD 1
  41.  
  42.       /* function prototypes */
  43.  
  44.       int  _Optlink _execl_ansi( char *, char *, ... );
  45.       int  _Optlink _execle_ansi( char *, char *, ... );
  46.       int  _Optlink _execlp_ansi( char *, char *, ... );
  47.       int  _Optlink _execlpe_ansi( char *, char *, ... );
  48.       void _Optlink _exit( int );
  49.       int  _Optlink _spawnl_ansi( int, char *, char *, ... );
  50.       int  _Optlink _spawnle_ansi( int, char *, char *, ... );
  51.       int  _Optlink _spawnlp_ansi( int, char *, char *, ... );
  52.       int  _Optlink _spawnlpe_ansi( int, char *, char *, ... );
  53.       void _Optlink abort( void );
  54.       int  _Optlink _cwait( int *, int, int );
  55.       int  _Optlink _execv( char *, char ** );
  56.       int  _Optlink _execve( char *, char **, char ** );
  57.       int  _Optlink _execvp( char *, char ** );
  58.       int  _Optlink _execvpe( char *, char **, char ** );
  59.       void _Optlink exit( int );
  60.       int  _Optlink _getpid( void );
  61.       int  _Optlink _spawnv( int, char *, char ** );
  62.       int  _Optlink _spawnve( int, char *, char **, char ** );
  63.       int  _Optlink _spawnvp( int, char *, char ** );
  64.       int  _Optlink _spawnvpe( int, char *, char **, char ** );
  65.       int  _Optlink _system( const char * );
  66.       int  _Optlink _wait( int * );
  67.  
  68.       #ifdef __cplusplus
  69.          int  inline _Optlink cwait(int *a, int b, int c )                   {  return _cwait( a, b, c );        }
  70.          int  inline _Optlink execv( char *a, char **b )                     {  return _execv( a, b );           }
  71.          int  inline _Optlink execve( char *a, char **b, char **c )          {  return _execve( a, b, c );       }
  72.          int  inline _Optlink execvp( char *a, char **b )                    {  return _execvp( a, b );          }
  73.          int  inline _Optlink execvpe( char *a, char **b, char **c )         {  return _execvpe( a, b, c );      }
  74.          int  inline _Optlink getpid()                                       {  return _getpid();                }
  75.          int  inline _Optlink spawnv( int a, char *b, char **c )             {  return _spawnv( a, b, c );       }
  76.          int  inline _Optlink spawnve( int a, char *b, char **c, char **d )  {  return _spawnve( a, b, c, d );   }
  77.          int  inline _Optlink spawnvp( int a, char *b, char **c )            {  return _spawnvp( a, b, c );      }
  78.          int  inline _Optlink spawnvpe( int a, char *b, char **c, char **d ) {  return _spawnvpe( a, b, c , d ); }
  79.          int  inline _Optlink system( const char *a )                        {  return _system( a );             }
  80.          int  inline _Optlink wait( int *a )                                 {  return _wait( a );               }
  81.       #else
  82.          #define  cwait( a, b, c )         _cwait( (a),(b),(c) )
  83.          #define  execv( a, b )            _execv( (a),(b) )
  84.          #define  execve( a, b, c )        _execve( (a),(b),(c) )
  85.          #define  execvp( a, b )           _execvp( (a),(b) )
  86.          #define  execvpe( a, b, c )       _execvpe( (a),(b),(c) )
  87.          #define  getpid                   _getpid
  88.          #define  spawnv( a, b, c )        _spawnv( (a),(b),(c) )
  89.          #define  spawnve( a, b, c, d )    _spawnve( (a),(b),(c),(d) )
  90.          #define  spawnvp( a, b, c )       _spawnvp( (a),(b),(c) )
  91.          #define  spawnvpe( a, b, c , d )  _spawnvpe( (a),(b),(c),(d) )
  92.          #define  system( a )              _system( a )
  93.          #define  wait( a )                _wait( a )
  94.       #endif
  95.  
  96.       #ifdef __MULTI__
  97.          int  _Optlink _beginthread( void ( * _Optlink __thread )( void * ), void *, unsigned, void * );
  98.          void _Optlink _endthread( void );
  99.          void ** _Optlink _threadstore( void );
  100.       #endif
  101.  
  102.       #pragma info( none )
  103.       int _Optlink _execl( );
  104.       int _Optlink _execle( );
  105.       int _Optlink _execlp( );
  106.       int _Optlink _execlpe( );
  107.       int _Optlink _spawnl( );
  108.       int _Optlink _spawnle( );
  109.       int _Optlink _spawnlp( );
  110.       int _Optlink _spawnlpe( );
  111.  
  112.       #define _execl    _execl_ansi
  113.       #define _execle   _execle_ansi
  114.       #define _execlp   _execlp_ansi
  115.       #define _execlpe  _execlpe_ansi
  116.       #define _spawnl   _spawnl_ansi
  117.       #define _spawnle  _spawnle_ansi
  118.       #define _spawnlp  _spawnlp_ansi
  119.       #define _spawnlpe _spawnlpe_ansi
  120.  
  121.       #define execl    _execl_ansi
  122.       #define execle   _execle_ansi
  123.       #define execlp   _execlp_ansi
  124.       #define execlpe  _execlpe_ansi
  125.       #define spawnl   _spawnl_ansi
  126.       #define spawnle  _spawnle_ansi
  127.       #define spawnlp  _spawnlp_ansi
  128.       #define spawnlpe _spawnlpe_ansi
  129.       #pragma info( restore )
  130.  
  131.    #endif
  132.  
  133.    #ifdef __cplusplus
  134.       }
  135.    #endif
  136.  
  137.    #pragma info( none )
  138.    #ifndef __CHKHDR__
  139.       #pragma info( restore )
  140.    #endif
  141.    #pragma info( restore )
  142.  
  143. #endif
  144.