os_fcntl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_fcntl.h
00006  *
00007  *  file control options
00008  *
00009  *  os_fcntl.h,v 1.6 2006/01/04 08:28:39 jwillemsen Exp
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_INCLUDE_OS_FCNTL_H
00017 #define ACE_OS_INCLUDE_OS_FCNTL_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-all.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/sys/os_stat.h"
00028 #include "ace/os_include/sys/os_types.h"
00029 
00030 #if !defined (ACE_LACKS_FCNTL_H)
00031 # include /**/ <fcntl.h>
00032 #endif /* !ACE_LACKS_FCNTL_H */
00033 
00034 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
00035 // for creat(), open()
00036 #  include /**/ <ioLib.h>
00037 #endif /* ACE_VXWORKS */
00038 
00039 // Place all additions (especially function declarations) within extern "C" {}
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif /* __cplusplus */
00044 
00045 #if defined (__BORLANDC__)
00046 #  define _O_CREAT O_CREAT
00047 #  define _O_EXCL  O_EXCL
00048 #  define _O_TRUNC O_TRUNC
00049    // 0x0800 is used for O_APPEND.  0x08 looks free.
00050 #  define _O_TEMPORARY 0x08 /* see fcntl.h */
00051 #  define _O_RDWR   O_RDWR
00052 #  define _O_WRONLY O_WRONLY
00053 #  define _O_RDONLY O_RDONLY
00054 #  define _O_APPEND O_APPEND
00055 #  define _O_BINARY O_BINARY
00056 #  define _O_TEXT   O_TEXT
00057 #endif /* __BORLANDC__ */
00058 
00059 #if defined (__DMC__)
00060 #  define _O_TEMPORARY 0x08 /* see fcntl.h */
00061 #endif /* __DMC__ */
00062 
00063 // defined Win32 specific macros for UNIX platforms
00064 #if !defined (O_BINARY)
00065 #  define O_BINARY 0
00066 #endif /* O_BINARY */
00067 #if !defined (_O_BINARY)
00068 #  define _O_BINARY O_BINARY
00069 #endif /* _O_BINARY */
00070 #if !defined (O_TEXT)
00071 #  define O_TEXT 0
00072 #endif /* O_TEXT */
00073 #if !defined (_O_TEXT)
00074 #  define _O_TEXT O_TEXT
00075 #endif /* _O_TEXT */
00076 #if !defined (O_RAW)
00077 #  define O_RAW 0
00078 #endif /* O_RAW */
00079 #if !defined (_O_RAW)
00080 #  define _O_RAW O_RAW
00081 #endif /* _O_RAW */
00082 
00083 #if defined (ACE_WIN32)
00084 #  define O_NDELAY    1
00085 #endif /* ACE_WIN32 */
00086 
00087 # if !defined (O_NONBLOCK)
00088 #   define O_NONBLOCK  1
00089 # endif /* O_NONBLOCK  */
00090 
00091 #if defined (ACE_HAS_POSIX_NONBLOCK)
00092 #  define ACE_NONBLOCK O_NONBLOCK
00093 #else
00094 #  define ACE_NONBLOCK O_NDELAY
00095 #endif /* ACE_HAS_POSIX_NONBLOCK */
00096 
00097 # if !defined (F_GETFL)
00098 #   define F_GETFL 0
00099 # endif /* F_GETFL */
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif /* __cplusplus */
00104 
00105 #include /**/ "ace/post.h"
00106 #endif /* ACE_OS_INCLUDE_OS_FCNTL_H */

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6