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

  1. #ifndef __io_h
  2.    #define __io_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.    /*  <io.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(__SPC__) || defined(__EXTENDED__) )
  30.  
  31.       int  _Optlink _access( const char *, int );
  32.       int  _Optlink _chmod( const char *, int );
  33.       int  _Optlink _chsize( int, long );
  34.       int  _Optlink _close( int );
  35.       int  _Optlink _creat( const char *, int );
  36.       int  _Optlink _dup( int );
  37.       int  _Optlink _dup2( int, int );
  38.       int  _Optlink _eof( int );
  39.       long _Optlink _filelength( int );
  40.       int  _Optlink _isatty( int );
  41.       long _Optlink _lseek( int, long, int );
  42.       int  _Optlink _open( const char *, int, ... );
  43.       int  _Optlink _read( int, void *, unsigned int );
  44.       int  _Optlink remove( const char * );
  45.       int  _Optlink rename( const char *, const char * );
  46.       int  _Optlink _sopen( const char *, int, int, ... );
  47.       long _Optlink _tell( int );
  48.       int  _Optlink _umask( int );
  49.       #ifdef __cplusplus
  50.          int  _Optlink _unlink( const char * );
  51.       #else
  52.          int  _Optlink _unlink( char * );
  53.       #endif
  54.       int  _Optlink _write( int, const void *, unsigned int );
  55.       int  _Optlink _setmode(int handle, int mode);
  56.  
  57.       #ifdef __cplusplus
  58.  
  59.          inline   int  _Optlink access( const char * a, int b)                  { return _access(a,b);   }
  60.          inline   int  _Optlink chmod( const char * a, int b)                   { return _chmod(a,b);    }
  61.          inline   int  _Optlink chsize( int a, long b)                          { return _chsize(a,b);   }
  62.          inline   int  _Optlink close( int a)                                   { return _close(a);      }
  63.          inline   int  _Optlink creat( const char * a, int b)                   { return _creat(a,b);    }
  64.          inline   int  _Optlink dup( int a)                                     { return _dup(a);        }
  65.          inline   int  _Optlink dup2( int a, int b)                             { return _dup2(a,b);     }
  66.          inline   int  _Optlink eof( int a )                                    { return _eof(a);        }
  67.          inline   long _Optlink filelength( int a)                              { return _filelength(a); }
  68.          inline   int  _Optlink isatty( int a)                                  { return _isatty(a);     }
  69.          inline   long _Optlink lseek( int a, long b, int c)                    { return _lseek(a,b,c);  }
  70.          inline   int  _Optlink read( int a, void * b, unsigned int c)          { return _read(a,b,c);   }
  71.          inline   long _Optlink tell( int a)                                    { return _tell(a);       }
  72.          inline   int  _Optlink umask( int a)                                   { return _umask(a);      }
  73.          #ifndef __unlink__
  74.             #define __unlink__
  75.             inline   int  _Optlink unlink( const char * a)                      { return _unlink(a);     }
  76.          #endif
  77.          inline   int  _Optlink write( int a, const void * b, unsigned int c)   { return _write(a,b,c);  }
  78.          inline   int  _Optlink setmode(int a, int b)                           { return _setmode(a,b);  }
  79.  
  80.          /*******************/
  81.          /* Temporary fixes */
  82.          /*******************/
  83.  
  84.          int  _Optlink open( const char *, int, ... );
  85.          int  _Optlink sopen( const char *, int, int, ... );
  86.  
  87.       #else
  88.  
  89.          #define  access( a,b )      _access( (a),(b) )
  90.          #define  chmod( a,b )       _chmod( (a),(b) )
  91.          #define  chsize( a,b )      _chsize( (a),(b) )
  92.          #define  close( a )         _close( a )
  93.          #define  creat( a,b )       _creat( (a),(b) )
  94.          #define  dup( a )           _dup( a )
  95.          #define  dup2( a,b )        _dup2( (a),(b) )
  96.          #define  eof( a )           _eof( a )
  97.          #define  filelength( a )    _filelength( a )
  98.          #define  isatty( a )        _isatty( a )
  99.          #define  lseek( a,b,c )     _lseek( (a),(b),(c) )
  100.          #define  open               _open
  101.          #define  read( a,b,c )      _read( (a),(b),(c) )
  102.          #define  sopen              _sopen
  103.          #define  tell( a )          _tell( a )
  104.          #define  umask( a )         _umask( a )
  105.          #ifndef unlink
  106.             #define unlink           _unlink
  107.          #endif
  108.          #define  write( a,b,c )     _write( (a),(b),(c) )
  109.          #define  setmode( a,b )     _setmode( (a),(b) )
  110.  
  111.       #endif
  112.  
  113.    #endif
  114.  
  115.    #ifdef __cplusplus
  116.       }
  117.    #endif
  118.  
  119.    #pragma info( none )
  120.    #ifndef __CHKHDR__
  121.       #pragma info( restore )
  122.    #endif
  123.    #pragma info( restore )
  124.  
  125. #endif
  126.