home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / process.h < prev    next >
Text File  |  1999-03-15  |  8KB  |  216 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __process_h
  10.    #define __process_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <process.h> header file                                         */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    #if defined(__EXTENDED__)
  42.  
  43.       /* Modeflag values for spawnxx routines */
  44.  
  45.       #define P_WAIT          0
  46.       #define P_NOWAIT        1
  47.       #define P_OVERLAY       2
  48.  
  49.       /* Action codes used with cwait() */
  50.  
  51.       #define WAIT_CHILD      0
  52.       #define WAIT_GRANDCHILD 1
  53.  
  54.       /* function prototypes */
  55.  
  56.       void _IMPORT _LNK_CONV abort( void );
  57.       void _IMPORT _LNK_CONV exit( int );
  58.       int  _IMPORT _LNK_CONV system( const char * );
  59.  
  60.       void _IMPORT _LNK_CONV _exit( int );
  61.  
  62.       int  _IMPORT _LNK_CONV _execl( char *, char *, ... );
  63.       int  _IMPORT _LNK_CONV _execle( char *, char *, ... );
  64.       int  _IMPORT _LNK_CONV _execlp( char *, char *, ... );
  65.       int  _IMPORT _LNK_CONV _execlpe( char *, char *, ... );
  66.       int  _IMPORT _LNK_CONV _spawnl( int, char *, char *, ... );
  67.       int  _IMPORT _LNK_CONV _spawnle( int, char *, char *, ... );
  68.       int  _IMPORT _LNK_CONV _spawnlp( int, char *, char *, ... );
  69.       int  _IMPORT _LNK_CONV _spawnlpe( int, char *, char *, ... );
  70.  
  71.       int  _IMPORT _LNK_CONV  execl( char *, char *, ... );
  72.       int  _IMPORT _LNK_CONV  execle( char *, char *, ... );
  73.       int  _IMPORT _LNK_CONV  execlp( char *, char *, ... );
  74.       int  _IMPORT _LNK_CONV  execlpe( char *, char *, ... );
  75.       int  _IMPORT _LNK_CONV  spawnl( int, char *, char *, ... );
  76.       int  _IMPORT _LNK_CONV  spawnle( int, char *, char *, ... );
  77.       int  _IMPORT _LNK_CONV  spawnlp( int, char *, char *, ... );
  78.       int  _IMPORT _LNK_CONV  spawnlpe( int, char *, char *, ... );
  79.  
  80.       #if __IBMC__ || __IBMCPP__
  81.          #if __WINDOWS__ && __THW_INTEL__
  82.             #pragma map(  _execl   , "?_execl_ansi"    )
  83.             #pragma map(  _execle  , "?_execle_ansi"   )
  84.             #pragma map(  _execlp  , "?_execlp_ansi"   )
  85.             #pragma map(  _execlpe , "?_execlpe_ansi"  )
  86.             #pragma map(  _spawnl  , "?_spawnl_ansi"   )
  87.             #pragma map(  _spawnle , "?_spawnle_ansi"  )
  88.             #pragma map(  _spawnlp , "?_spawnlp_ansi"  )
  89.             #pragma map(  _spawnlpe, "?_spawnlpe_ansi" )
  90.  
  91.             #pragma map(  execl   , "?_execl_ansi"    )
  92.             #pragma map(  execle  , "?_execle_ansi"   )
  93.             #pragma map(  execlp  , "?_execlp_ansi"   )
  94.             #pragma map(  execlpe , "?_execlpe_ansi"  )
  95.             #pragma map(  spawnl  , "?_spawnl_ansi"   )
  96.             #pragma map(  spawnle , "?_spawnle_ansi"  )
  97.             #pragma map(  spawnlp , "?_spawnlp_ansi"  )
  98.             #pragma map(  spawnlpe, "?_spawnlpe_ansi" )
  99.          #else
  100.             #pragma map( _execl   , "_execl_ansi"    )
  101.             #pragma map( _execle  , "_execle_ansi"   )
  102.             #pragma map( _execlp  , "_execlp_ansi"   )
  103.             #pragma map( _execlpe , "_execlpe_ansi"  )
  104.             #pragma map( _spawnl  , "_spawnl_ansi"   )
  105.             #pragma map( _spawnle , "_spawnle_ansi"  )
  106.             #pragma map( _spawnlp , "_spawnlp_ansi"  )
  107.             #pragma map( _spawnlpe, "_spawnlpe_ansi" )
  108.  
  109.             #pragma map(  execl   , "_execl_ansi"    )
  110.             #pragma map(  execle  , "_execle_ansi"   )
  111.             #pragma map(  execlp  , "_execlp_ansi"   )
  112.             #pragma map(  execlpe , "_execlpe_ansi"  )
  113.             #pragma map(  spawnl  , "_spawnl_ansi"   )
  114.             #pragma map(  spawnle , "_spawnle_ansi"  )
  115.             #pragma map(  spawnlp , "_spawnlp_ansi"  )
  116.             #pragma map(  spawnlpe, "_spawnlpe_ansi" )
  117.          #endif
  118.       #else
  119.          #define execl _execl
  120.          #define execle _execle
  121.          #define execlp _execlp
  122.          #define execlpe _execlpe
  123.          #define spawnl _spawnl
  124.          #define spawnle _spawnle
  125.          #define spawnlp _spawnlp
  126.          #define spawnlpe _spawnlpe
  127.       #endif
  128.  
  129.       int  _IMPORT _LNK_CONV _cwait( int *, int, int );
  130.       int  _IMPORT _LNK_CONV _execv( char *, char ** );
  131.       int  _IMPORT _LNK_CONV _execve( char *, char **, char ** );
  132.       int  _IMPORT _LNK_CONV _execvp( char *, char ** );
  133.       int  _IMPORT _LNK_CONV _execvpe( char *, char **, char ** );
  134.       int  _IMPORT _LNK_CONV _getpid( void );
  135.       int  _IMPORT _LNK_CONV _spawnv( int, char *, char ** );
  136.       int  _IMPORT _LNK_CONV _spawnve( int, char *, char **, char ** );
  137.       int  _IMPORT _LNK_CONV _spawnvp( int, char *, char ** );
  138.       int  _IMPORT _LNK_CONV _spawnvpe( int, char *, char **, char ** );
  139.       int  _IMPORT _LNK_CONV _wait( int * );
  140.  
  141.       int  _IMPORT _LNK_CONV  cwait( int *, int, int );
  142.       int  _IMPORT _LNK_CONV  execv( char *, char ** );
  143.       int  _IMPORT _LNK_CONV  execve( char *, char **, char ** );
  144.       int  _IMPORT _LNK_CONV  execvp( char *, char ** );
  145.       int  _IMPORT _LNK_CONV  execvpe( char *, char **, char ** );
  146.       int  _IMPORT _LNK_CONV  getpid( void );
  147.       int  _IMPORT _LNK_CONV  spawnv( int, char *, char ** );
  148.       int  _IMPORT _LNK_CONV  spawnve( int, char *, char **, char ** );
  149.       int  _IMPORT _LNK_CONV  spawnvp( int, char *, char ** );
  150.       int  _IMPORT _LNK_CONV  spawnvpe( int, char *, char **, char ** );
  151.       #ifdef __OS2__
  152.          int  _IMPORT _LNK_CONV  wait( int * );
  153.       #endif
  154.  
  155.       #if __IBMC__ || __IBMCPP__
  156.          #if __WINDOWS__ && __THW_INTEL__
  157.             #pragma map( cwait   , "?_cwait"    )
  158.             #pragma map( execv   , "?_execv"    )
  159.             #pragma map( execve  , "?_execve"   )
  160.             #pragma map( execvp  , "?_execvp"   )
  161.             #pragma map( execvpe , "?_execvpe"  )
  162.             #pragma map( getpid  , "?_getpid"   )
  163.             #pragma map( spawnv  , "?_spawnv"   )
  164.             #pragma map( spawnve , "?_spawnve"  )
  165.             #pragma map( spawnvp , "?_spawnvp"  )
  166.             #pragma map( spawnvpe, "?_spawnvpe" )
  167.          #else
  168.             #pragma map( cwait   , "_cwait"    )
  169.             #pragma map( execv   , "_execv"    )
  170.             #pragma map( execve  , "_execve"   )
  171.             #pragma map( execvp  , "_execvp"   )
  172.             #pragma map( execvpe , "_execvpe"  )
  173.             #pragma map( getpid  , "_getpid"   )
  174.             #pragma map( spawnv  , "_spawnv"   )
  175.             #pragma map( spawnve , "_spawnve"  )
  176.             #pragma map( spawnvp , "_spawnvp"  )
  177.             #pragma map( spawnvpe, "_spawnvpe" )
  178.             #pragma map( wait    , "_wait"     )
  179.          #endif
  180.       #else
  181.          #define cwait _cwait
  182.          #define execv _execv
  183.          #define execve _execve
  184.          #define execvp _execvp
  185.          #define execvpe _execvpe
  186.          #define getpid _getpid
  187.          #define spawnv _spawnv
  188.          #define spawnve _spawnve
  189.          #define spawnvp _spawnvp
  190.          #define spawnvpe _spawnvpe
  191.          #define wait _wait
  192.       #endif
  193.  
  194.       #ifdef __MULTI__
  195.          int  _IMPORT _LNK_CONV _beginthread( void ( * _LNK_CONV )( void * ), void *, unsigned, void * );
  196.          void _IMPORT _LNK_CONV _endthread( void );
  197.          void ** _IMPORT _LNK_CONV _threadstore( void );
  198.       #endif
  199.  
  200.    #endif
  201.  
  202.    #ifdef __cplusplus
  203.       }
  204.    #endif
  205.  
  206. #endif
  207.  
  208. #if __IBMC__ || __IBMCPP__
  209. #pragma info( none )
  210. #ifndef __CHKHDR__
  211.    #pragma info( restore )
  212. #endif
  213. #pragma info( restore )
  214. #endif
  215.  
  216.