home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / process.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  8.8 KB  |  228 lines

  1. #if (defined(__IBMC__) || defined(__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.       #ifdef _M_I386
  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.    /*  VisualAge for C++ for Windows, Version 3.5                      */
  36.    /*    Licensed Material - Property of IBM                           */
  37.    /*                                                                  */
  38.    /*  5801-ARR and Other Materials                                    */
  39.    /*                                                                  */
  40.    /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  41.    /*                                                                  */
  42.    /********************************************************************/
  43.  
  44.    #if defined(__EXTENDED__)
  45.  
  46.       /* Modeflag values for spawnxx routines */
  47.  
  48.       #define P_WAIT          0
  49.       #define P_NOWAIT        1
  50.       #define P_OVERLAY       2
  51.  
  52.       /* Action codes used with cwait() */
  53.  
  54.       #define WAIT_CHILD      0
  55.       #define WAIT_GRANDCHILD 1
  56.  
  57.       /* function prototypes */
  58.  
  59.       void _IMPORT _LNK_CONV abort( void );
  60.       void _IMPORT _LNK_CONV exit( int );
  61.       int  _IMPORT _LNK_CONV system( const char * );
  62.  
  63.       void _IMPORT _LNK_CONV _exit( int );
  64.  
  65.       int  _IMPORT _LNK_CONV _execl( char *, char *, ... );
  66.       int  _IMPORT _LNK_CONV _execle( char *, char *, ... );
  67.       int  _IMPORT _LNK_CONV _execlp( char *, char *, ... );
  68.       int  _IMPORT _LNK_CONV _execlpe( char *, char *, ... );
  69.       int  _IMPORT _LNK_CONV _spawnl( int, char *, char *, ... );
  70.       int  _IMPORT _LNK_CONV _spawnle( int, char *, char *, ... );
  71.       int  _IMPORT _LNK_CONV _spawnlp( int, char *, char *, ... );
  72.       int  _IMPORT _LNK_CONV _spawnlpe( int, char *, char *, ... );
  73.  
  74.       int  _IMPORT _LNK_CONV  execl( char *, char *, ... );
  75.       int  _IMPORT _LNK_CONV  execle( char *, char *, ... );
  76.       int  _IMPORT _LNK_CONV  execlp( char *, char *, ... );
  77.       int  _IMPORT _LNK_CONV  execlpe( char *, char *, ... );
  78.       int  _IMPORT _LNK_CONV  spawnl( int, char *, char *, ... );
  79.       int  _IMPORT _LNK_CONV  spawnle( int, char *, char *, ... );
  80.       int  _IMPORT _LNK_CONV  spawnlp( int, char *, char *, ... );
  81.       int  _IMPORT _LNK_CONV  spawnlpe( int, char *, char *, ... );
  82.  
  83.     #if (defined(__IBMC__) || defined(__IBMCPP__))
  84.       #ifdef __OS2__
  85.       #pragma map( _execl   , "_execl_ansi"    )
  86.       #pragma map( _execle  , "_execle_ansi"   )
  87.       #pragma map( _execlp  , "_execlp_ansi"   )
  88.       #pragma map( _execlpe , "_execlpe_ansi"  )
  89.       #pragma map( _spawnl  , "_spawnl_ansi"   )
  90.       #pragma map( _spawnle , "_spawnle_ansi"  )
  91.       #pragma map( _spawnlp , "_spawnlp_ansi"  )
  92.       #pragma map( _spawnlpe, "_spawnlpe_ansi" )
  93.  
  94.       #pragma map(  execl   , "_execl_ansi"    )
  95.       #pragma map(  execle  , "_execle_ansi"   )
  96.       #pragma map(  execlp  , "_execlp_ansi"   )
  97.       #pragma map(  execlpe , "_execlpe_ansi"  )
  98.       #pragma map(  spawnl  , "_spawnl_ansi"   )
  99.       #pragma map(  spawnle , "_spawnle_ansi"  )
  100.       #pragma map(  spawnlp , "_spawnlp_ansi"  )
  101.       #pragma map(  spawnlpe, "_spawnlpe_ansi" )
  102.       #else
  103.       #pragma map(  _execl   , "?_execl_ansi"    )
  104.       #pragma map(  _execle  , "?_execle_ansi"   )
  105.       #pragma map(  _execlp  , "?_execlp_ansi"   )
  106.       #pragma map(  _execlpe , "?_execlpe_ansi"  )
  107.       #pragma map(  _spawnl  , "?_spawnl_ansi"   )
  108.       #pragma map(  _spawnle , "?_spawnle_ansi"  )
  109.       #pragma map(  _spawnlp , "?_spawnlp_ansi"  )
  110.       #pragma map(  _spawnlpe, "?_spawnlpe_ansi" )
  111.  
  112.       #pragma map(  execl   , "?_execl_ansi"    )
  113.       #pragma map(  execle  , "?_execle_ansi"   )
  114.       #pragma map(  execlp  , "?_execlp_ansi"   )
  115.       #pragma map(  execlpe , "?_execlpe_ansi"  )
  116.       #pragma map(  spawnl  , "?_spawnl_ansi"   )
  117.       #pragma map(  spawnle , "?_spawnle_ansi"  )
  118.       #pragma map(  spawnlp , "?_spawnlp_ansi"  )
  119.       #pragma map(  spawnlpe, "?_spawnlpe_ansi" )
  120.       #endif
  121.     #else
  122.       #pragma Alias( _execl   , "_execl_ansi"    )
  123.       #pragma Alias( _execle  , "_execle_ansi"   )
  124.       #pragma Alias( _execlp  , "_execlp_ansi"   )
  125.       #pragma Alias( _execlpe , "_execlpe_ansi"  )
  126.       #pragma Alias( _spawnl  , "_spawnl_ansi"   )
  127.       #pragma Alias( _spawnle , "_spawnle_ansi"  )
  128.       #pragma Alias( _spawnlp , "_spawnlp_ansi"  )
  129.       #pragma Alias( _spawnlpe, "_spawnlpe_ansi" )
  130.  
  131.       #pragma Alias(  execl   , "_execl_ansi"    )
  132.       #pragma Alias(  execle  , "_execle_ansi"   )
  133.       #pragma Alias(  execlp  , "_execlp_ansi"   )
  134.       #pragma Alias(  execlpe , "_execlpe_ansi"  )
  135.       #pragma Alias(  spawnl  , "_spawnl_ansi"   )
  136.       #pragma Alias(  spawnle , "_spawnle_ansi"  )
  137.       #pragma Alias(  spawnlp , "_spawnlp_ansi"  )
  138.       #pragma Alias(  spawnlpe, "_spawnlpe_ansi" )
  139.     #endif
  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.       int  _IMPORT _LNK_CONV _wait( int * );
  152.  
  153.       int  _IMPORT _LNK_CONV  cwait( int *, int, int );
  154.       int  _IMPORT _LNK_CONV  execv( char *, char ** );
  155.       int  _IMPORT _LNK_CONV  execve( char *, char **, char ** );
  156.       int  _IMPORT _LNK_CONV  execvp( char *, char ** );
  157.       int  _IMPORT _LNK_CONV  execvpe( char *, char **, char ** );
  158.       int  _IMPORT _LNK_CONV  getpid( void );
  159.       int  _IMPORT _LNK_CONV  spawnv( int, char *, char ** );
  160.       int  _IMPORT _LNK_CONV  spawnve( int, char *, char **, char ** );
  161.       int  _IMPORT _LNK_CONV  spawnvp( int, char *, char ** );
  162.       int  _IMPORT _LNK_CONV  spawnvpe( int, char *, char **, char ** );
  163.     #ifdef __OS2__
  164.       int  _IMPORT _LNK_CONV  wait( int * );
  165.     #endif
  166.  
  167.     #if (defined(__IBMC__) || defined(__IBMCPP__))
  168.       #ifdef __OS2__
  169.       #pragma map( cwait   , "_cwait"    )
  170.       #pragma map( execv   , "_execv"    )
  171.       #pragma map( execve  , "_execve"   )
  172.       #pragma map( execvp  , "_execvp"   )
  173.       #pragma map( execvpe , "_execvpe"  )
  174.       #pragma map( getpid  , "_getpid"   )
  175.       #pragma map( spawnv  , "_spawnv"   )
  176.       #pragma map( spawnve , "_spawnve"  )
  177.       #pragma map( spawnvp , "_spawnvp"  )
  178.       #pragma map( spawnvpe, "_spawnvpe" )
  179.       #pragma map( wait    , "_wait"     )
  180.       #else
  181.       #pragma map( cwait   , "?_cwait"    )
  182.       #pragma map( execv   , "?_execv"    )
  183.       #pragma map( execve  , "?_execve"   )
  184.       #pragma map( execvp  , "?_execvp"   )
  185.       #pragma map( execvpe , "?_execvpe"  )
  186.       #pragma map( getpid  , "?_getpid"   )
  187.       #pragma map( spawnv  , "?_spawnv"   )
  188.       #pragma map( spawnve , "?_spawnve"  )
  189.       #pragma map( spawnvp , "?_spawnvp"  )
  190.       #pragma map( spawnvpe, "?_spawnvpe" )
  191.       #endif
  192.     #else
  193.       #pragma Alias( cwait   , "_cwait"    )
  194.       #pragma Alias( execv   , "_execv"    )
  195.       #pragma Alias( execve  , "_execve"   )
  196.       #pragma Alias( execvp  , "_execvp"   )
  197.       #pragma Alias( execvpe , "_execvpe"  )
  198.       #pragma Alias( getpid  , "_getpid"   )
  199.       #pragma Alias( spawnv  , "_spawnv"   )
  200.       #pragma Alias( spawnve , "_spawnve"  )
  201.       #pragma Alias( spawnvp , "_spawnvp"  )
  202.       #pragma Alias( spawnvpe, "_spawnvpe" )
  203.       #pragma Alias( wait    , "_wait"     )
  204.     #endif
  205.  
  206.       #ifdef __MULTI__
  207.          int  _IMPORT _LNK_CONV _beginthread( void ( * _LNK_CONV )( void * ), void *, unsigned, void * );
  208.          void _IMPORT _LNK_CONV _endthread( void );
  209.          void ** _IMPORT _LNK_CONV _threadstore( void );
  210.       #endif
  211.  
  212.    #endif
  213.  
  214.    #ifdef __cplusplus
  215.       }
  216.    #endif
  217.  
  218. #endif
  219.  
  220. #if (defined(__IBMC__) || defined(__IBMCPP__))
  221. #pragma info( none )
  222. #ifndef __CHKHDR__
  223.    #pragma info( restore )
  224. #endif
  225. #pragma info( restore )
  226. #endif
  227.  
  228.