00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file OS_NS_fcntl.h 00006 * 00007 * $Id: OS_NS_fcntl.h 87487 2009-11-12 07:54:39Z johnnyw $ 00008 * 00009 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> 00010 * @author Jesper S. M|ller<stophph@diku.dk> 00011 * @author and a cast of thousands... 00012 * 00013 * Originally in OS.h. 00014 */ 00015 //============================================================================= 00016 00017 #ifndef ACE_OS_NS_FCNTL_H 00018 # define ACE_OS_NS_FCNTL_H 00019 00020 # include /**/ "ace/pre.h" 00021 00022 # include "ace/config-all.h" 00023 00024 # if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 # endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #include "ace/os_include/os_fcntl.h" 00029 #include "ace/Global_Macros.h" // for LPSECURITY_ATTRIBUTES :-( 00030 #include "ace/Default_Constants.h" 00031 #include /**/ "ace/ACE_export.h" 00032 00033 #if defined (ACE_EXPORT_MACRO) 00034 # undef ACE_EXPORT_MACRO 00035 #endif 00036 #define ACE_EXPORT_MACRO ACE_Export 00037 00038 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00039 00040 namespace ACE_OS { 00041 00042 ACE_NAMESPACE_INLINE_FUNCTION 00043 int fcntl (ACE_HANDLE handle, 00044 int cmd, 00045 long arg = 0); 00046 00047 /// The O_APPEND flag is only partly supported on Win32. If you specify 00048 /// O_APPEND, then the file pointer will be positioned at the end of 00049 /// the file initially during open, but it is not re-positioned at 00050 /// the end prior to each write, as specified by POSIX. This 00051 /// is generally good enough for typical situations, but it is ``not 00052 /// quite right'' in its semantics. 00053 extern ACE_Export 00054 ACE_HANDLE open (const char *filename, 00055 int mode, 00056 mode_t perms = ACE_DEFAULT_OPEN_PERMS, 00057 LPSECURITY_ATTRIBUTES sa = 0); 00058 #if defined (ACE_HAS_WCHAR) 00059 extern ACE_Export 00060 ACE_HANDLE open (const wchar_t *filename, 00061 int mode, 00062 mode_t perms = ACE_DEFAULT_OPEN_PERMS, 00063 LPSECURITY_ATTRIBUTES sa = 0); 00064 #endif /* ACE_HAS_WCHAR */ 00065 00066 } /* namespace ACE_OS */ 00067 00068 ACE_END_VERSIONED_NAMESPACE_DECL 00069 00070 # if defined (ACE_HAS_INLINED_OSCALLS) 00071 # if defined (ACE_INLINE) 00072 # undef ACE_INLINE 00073 # endif /* ACE_INLINE */ 00074 # define ACE_INLINE inline 00075 # include "ace/OS_NS_fcntl.inl" 00076 # endif /* ACE_HAS_INLINED_OSCALLS */ 00077 00078 # include /**/ "ace/post.h" 00079 #endif /* ACE_OS_NS_FCNTL_H */