OS_NS_sys_stat.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   OS_NS_sys_stat.h
00006  *
00007  *  OS_NS_sys_stat.h,v 1.14 2006/06/12 11:06:34 jwillemsen Exp
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_SYS_STAT_H
00018 # define ACE_OS_NS_SYS_STAT_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/sys/os_stat.h"
00029 #include "ace/Default_Constants.h" // for ACE_DEFAULT_DIR_PERMS
00030 #include "ace/ACE_export.h"
00031 
00032 #if defined (ACE_EXPORT_MACRO)
00033 #  undef ACE_EXPORT_MACRO
00034 #endif
00035 #define ACE_EXPORT_MACRO ACE_Export
00036 
00037 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00038 
00039 #if defined (ACE_WIN32) && defined (__BORLANDC__)
00040 typedef struct stati64 ACE_stat;
00041 #elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined(__IBMCPP__) && ((defined _MSC_VER) && _MSC_VER >= 1400)
00042 // For vc8 which has time_t as 64bit
00043 typedef struct __stat64 ACE_stat;
00044 #elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined(__IBMCPP__) && ((defined _MSC_VER) && _MSC_VER >= 1300)
00045 // For vc71 which has time_t as 32bit
00046 typedef struct _stati64 ACE_stat;
00047 #elif defined (__MINGW32__)
00048 typedef struct _stat ACE_stat;
00049 #else
00050 typedef struct stat ACE_stat;
00051 #endif /* ACE_WIN32 */
00052 
00053 namespace ACE_OS
00054 {
00055 
00056   ACE_NAMESPACE_INLINE_FUNCTION
00057   ACE_HANDLE creat (const ACE_TCHAR *filename,
00058                     mode_t mode);
00059 
00060   //@{ @name A set of wrappers for low-level file operations.
00061 
00062   // non-standard
00063   ACE_NAMESPACE_INLINE_FUNCTION
00064   ACE_LOFF_T filesize (ACE_HANDLE handle);
00065 
00066   ACE_NAMESPACE_INLINE_FUNCTION
00067   ACE_LOFF_T filesize (const ACE_TCHAR *handle);
00068   //@}
00069 
00070   ACE_NAMESPACE_INLINE_FUNCTION
00071   int fstat (ACE_HANDLE,
00072              ACE_stat *);
00073 
00074   ACE_NAMESPACE_INLINE_FUNCTION
00075   int lstat (const char *,
00076              ACE_stat *);
00077 
00078 #if defined (ACE_HAS_WCHAR)
00079   ACE_NAMESPACE_INLINE_FUNCTION
00080   int lstat (const wchar_t *,
00081              ACE_stat *);
00082 #endif /* ACE_HAS_WCHAR */
00083 
00084   ACE_NAMESPACE_INLINE_FUNCTION
00085   int mkdir (const char *path,
00086              mode_t mode = ACE_DEFAULT_DIR_PERMS);
00087 
00088 #if defined (ACE_HAS_WCHAR)
00089   ACE_NAMESPACE_INLINE_FUNCTION
00090   int mkdir (const wchar_t *path,
00091              mode_t mode = ACE_DEFAULT_DIR_PERMS);
00092 #endif /* ACE_HAS_WCHAR */
00093 
00094   ACE_NAMESPACE_INLINE_FUNCTION
00095   int mkfifo (const ACE_TCHAR *file,
00096               mode_t mode = ACE_DEFAULT_FILE_PERMS);
00097 
00098   ACE_NAMESPACE_INLINE_FUNCTION
00099   int stat (const char *file, ACE_stat *);
00100 
00101 #if defined (ACE_HAS_WCHAR)
00102   ACE_NAMESPACE_INLINE_FUNCTION
00103   int stat (const wchar_t *file, ACE_stat *);
00104 #endif /* ACE_HAS_WCHAR */
00105 
00106   ACE_NAMESPACE_INLINE_FUNCTION
00107   mode_t umask (mode_t cmask);
00108 
00109 } /* namespace ACE_OS */
00110 
00111 ACE_END_VERSIONED_NAMESPACE_DECL
00112 
00113 # if defined (ACE_HAS_INLINED_OSCALLS)
00114 #   if defined (ACE_INLINE)
00115 #     undef ACE_INLINE
00116 #   endif /* ACE_INLINE */
00117 #   define ACE_INLINE inline
00118 #   include "ace/OS_NS_sys_stat.inl"
00119 # endif /* ACE_HAS_INLINED_OSCALLS */
00120 
00121 # include /**/ "ace/post.h"
00122 #endif /* ACE_OS_NS_SYS_STAT_H */

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