Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / OS_NS_sys_stat.h
blobfa044aa1dcc4bf7d5b8465bf2a8f0a8b2d6b8c8a
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file OS_NS_sys_stat.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 * @author Jesper S. M|ller<stophph@diku.dk>
9 * @author and a cast of thousands...
11 //=============================================================================
13 #ifndef ACE_OS_NS_SYS_STAT_H
14 # define ACE_OS_NS_SYS_STAT_H
16 # include /**/ "ace/pre.h"
18 # include "ace/config-all.h"
20 # if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 # endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/os_include/sys/os_stat.h"
25 #include "ace/Default_Constants.h" // for ACE_DEFAULT_DIR_PERMS
26 #include /**/ "ace/ACE_export.h"
28 #if defined (ACE_EXPORT_MACRO)
29 # undef ACE_EXPORT_MACRO
30 #endif
31 #define ACE_EXPORT_MACRO ACE_Export
33 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
35 # if defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined (ACE_WIN32)
36 # if defined (_MSC_VER)
37 typedef struct _stat64 ACE_stat;
38 # define ACE_STAT_FUNC_NAME ::_stat64
39 # define ACE_WSTAT_FUNC_NAME ::_wstat64
40 # elif defined (__MINGW32__)
41 typedef struct _stati64 ACE_stat;
42 # define ACE_STAT_FUNC_NAME ::_stati64
43 # define ACE_WSTAT_FUNC_NAME ::_wstati64
44 # elif defined (__BORLANDC__)
45 typedef struct stati64 ACE_stat;
46 # define ACE_STAT_FUNC_NAME ::_stati64
47 # define ACE_WSTAT_FUNC_NAME ::_wstati64
48 # else
49 typedef struct stat ACE_stat;
50 # define ACE_STAT_FUNC_NAME ::stat
51 # define ACE_WSTAT_FUNC_NAME ACE_STAT_FUNC_NAME
52 # endif /**/
53 # else
54 // Default file offset case.
55 # if defined (ACE_WIN32)
56 typedef struct _stat ACE_stat;
57 # define ACE_STAT_FUNC_NAME ::_stat
58 # define ACE_WSTAT_FUNC_NAME ::_wstat
59 # else
60 typedef struct stat ACE_stat;
61 # define ACE_STAT_FUNC_NAME ::stat
62 # define ACE_WSTAT_FUNC_NAME ACE_STAT_FUNC_NAME
63 # endif /* ACE_WIN32 */
64 # endif /* _FILE_OFFSET_BITS == 64 && ACE_WIN32 */
66 namespace ACE_OS
68 ACE_NAMESPACE_INLINE_FUNCTION
69 ACE_HANDLE creat (const ACE_TCHAR *filename,
70 mode_t mode);
72 //@{ @name A set of wrappers for low-level file operations.
74 // non-standard
75 ACE_NAMESPACE_INLINE_FUNCTION
76 ACE_OFF_T filesize (ACE_HANDLE handle);
78 ACE_NAMESPACE_INLINE_FUNCTION
79 ACE_OFF_T filesize (const ACE_TCHAR *handle);
80 //@}
82 ACE_NAMESPACE_INLINE_FUNCTION
83 int fstat (ACE_HANDLE,
84 ACE_stat *);
86 ACE_NAMESPACE_INLINE_FUNCTION
87 int lstat (const char *,
88 ACE_stat *);
90 #if defined (ACE_HAS_WCHAR)
91 ACE_NAMESPACE_INLINE_FUNCTION
92 int lstat (const wchar_t *,
93 ACE_stat *);
94 #endif /* ACE_HAS_WCHAR */
96 ACE_NAMESPACE_INLINE_FUNCTION
97 int mkdir (const char *path,
98 mode_t mode = ACE_DEFAULT_DIR_PERMS);
100 #if defined (ACE_HAS_WCHAR)
101 ACE_NAMESPACE_INLINE_FUNCTION
102 int mkdir (const wchar_t *path,
103 mode_t mode = ACE_DEFAULT_DIR_PERMS);
104 #endif /* ACE_HAS_WCHAR */
106 ACE_NAMESPACE_INLINE_FUNCTION
107 int mkfifo (const ACE_TCHAR *file,
108 mode_t mode = ACE_DEFAULT_FILE_PERMS);
110 ACE_NAMESPACE_INLINE_FUNCTION
111 int stat (const char *file, ACE_stat *);
113 #if defined (ACE_HAS_WCHAR)
114 ACE_NAMESPACE_INLINE_FUNCTION
115 int stat (const wchar_t *file, ACE_stat *);
116 #endif /* ACE_HAS_WCHAR */
118 ACE_NAMESPACE_INLINE_FUNCTION
119 mode_t umask (mode_t cmask);
120 } /* namespace ACE_OS */
122 ACE_END_VERSIONED_NAMESPACE_DECL
124 # if defined (ACE_HAS_INLINED_OSCALLS)
125 # if defined (ACE_INLINE)
126 # undef ACE_INLINE
127 # endif /* ACE_INLINE */
128 # define ACE_INLINE inline
129 # include "ace/OS_NS_sys_stat.inl"
130 # endif /* ACE_HAS_INLINED_OSCALLS */
132 # include /**/ "ace/post.h"
133 #endif /* ACE_OS_NS_SYS_STAT_H */