Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /****************************************************************************
  2. *
  3. *                            Open Watcom Project
  4. *
  5. *    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
  6. *
  7. *  ========================================================================
  8. *
  9. *    This file contains Original Code and/or Modifications of Original
  10. *    Code as defined in and that are subject to the Sybase Open Watcom
  11. *    Public License version 1.0 (the 'License'). You may not use this file
  12. *    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
  13. *    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
  14. *    provided with the Original Code and Modifications, and is also
  15. *    available at www.sybase.com/developer/opensource.
  16. *
  17. *    The Original Code and all software distributed under the License are
  18. *    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  19. *    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
  20. *    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
  21. *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
  22. *    NON-INFRINGEMENT. Please see the License for the specific language
  23. *    governing rights and limitations under the License.
  24. *
  25. *  ========================================================================
  26. *
  27. * Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
  28. *               DESCRIBE IT HERE!
  29. *
  30. ****************************************************************************/
  31.  
  32.  
  33. #define _ValidFile( fp, retval )        /* make sure fp is a valid pointer */
  34. #define SetupTGCSandNCS( x )            /* initialization for Netware/386 */
  35.  
  36. #if defined(__SW_BM)
  37.  
  38.     #define _AccessFile( fp )       _AccessFileH( (fp)->_handle )
  39.     #define _ReleaseFile( fp )      _ReleaseFileH( (fp)->_handle )
  40.  
  41.     #if defined(__386__) || defined(__AXP__) || defined(__PPC__)
  42.         extern void (*_AccessFileH)( int );
  43.         extern void (*_ReleaseFileH)( int );
  44.         extern void (*_AccessIOB)( void );
  45.         extern void (*_ReleaseIOB)( void );
  46.     #else
  47.         // 16bit OS/2 multi-thread is different
  48.         extern void __AccessFileH( int );
  49.         extern void __ReleaseFileH( int );
  50.         extern void __AccessIOB( void );
  51.         extern void __ReleaseIOB( void );
  52.  
  53.         // define macros to call the access routines directly for OS/2 1.x
  54.         #define _AccessFileH( hdl )     __AccessFileH( hdl )
  55.         #define _ReleaseFileH( hdl )    __ReleaseFileH( hdl )
  56.         #define _AccessIOB()            __AccessIOB()
  57.         #define _ReleaseIOB()           __ReleaseIOB()
  58.     #endif
  59.     #if defined(__NT__)
  60.         extern void (*_AccessFList)( void );
  61.         extern void (*_ReleaseFList)( void );
  62.     #endif
  63.  
  64. #else
  65.     /* these are for multi thread support */
  66.     /* they are not required if not building multi-thread library */
  67.     /* note: 32 bit NETWARE, OS/2, NT, QNX libraries are always multi-thread */
  68.     #define _AccessFile( fp )           /* gain access to the FILE* pointer */
  69.     #define _ReleaseFile( fp )          /* release access */
  70.  
  71.     #define _AccessFileH( hdl )         /* gain access to the file handle */
  72.     #define _ReleaseFileH( hdl )        /* release access */
  73.  
  74.     #define _AccessIOB()                /* gain access to array of __iob's */
  75.     #define _ReleaseIOB()               /* release access */
  76.  
  77.     #if defined(__NT__)
  78.         #define _AccessFList()
  79.         #define _ReleaseFList()
  80.     #endif
  81. #endif
  82.