summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_sys_stat.inl
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/OS_NS_sys_stat.inl')
-rw-r--r--ACE/ace/OS_NS_sys_stat.inl20
1 files changed, 16 insertions, 4 deletions
diff --git a/ACE/ace/OS_NS_sys_stat.inl b/ACE/ace/OS_NS_sys_stat.inl
index 93e321dd177..cd0ef6eb770 100644
--- a/ACE/ace/OS_NS_sys_stat.inl
+++ b/ACE/ace/OS_NS_sys_stat.inl
@@ -4,6 +4,10 @@
#include "ace/OS_NS_errno.h"
#include "ace/OS_NS_macros.h"
+#ifdef ACE_MQX
+# include "ace/MQX_Filesystem.h"
+#endif
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS
@@ -13,7 +17,7 @@ namespace ACE_OS
creat (const ACE_TCHAR *filename, mode_t mode)
{
ACE_OS_TRACE ("ACE_OS::creat");
-#if defined (ACE_WIN32)
+#if defined (ACE_WIN32) || defined (ACE_MQX)
return ACE_OS::open (filename, O_CREAT|O_TRUNC|O_WRONLY, mode);
#else
ACE_OSCALL_RETURN (::creat (ACE_TEXT_ALWAYS_CHAR (filename), mode),
@@ -56,14 +60,18 @@ namespace ACE_OS
(fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? S_IFDIR : S_IFREG);
}
return 0;
+#elif defined (ACE_LACKS_FSTAT)
+ ACE_NOTSUP_RETURN (-1);
+#elif defined (ACE_MQX)
+ return MQX_Filesystem::inst ().fstat (handle, stp);
#else
-# if defined (ACE_OPENVMS)
+# if defined (ACE_OPENVMS)
//FUZZ: disable check_for_lack_ACE_OS
::fsync(handle);
//FUZZ: enable check_for_lack_ACE_OS
- #endif
+# endif
ACE_OSCALL_RETURN (::fstat (handle, stp), int, -1);
-# endif /* !ACE_HAS_X86_STAT_MACROS */
+#endif /* !ACE_HAS_X86_STAT_MACROS */
}
// This function returns the number of bytes in the file referenced by
@@ -197,6 +205,8 @@ namespace ACE_OS
ACE_OS_TRACE ("ACE_OS::stat");
#if defined (ACE_HAS_NONCONST_STAT)
ACE_OSCALL_RETURN (::stat (const_cast <char *> (file), stp), int, -1);
+#elif defined (ACE_LACKS_STAT)
+ ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_HAS_WINCE)
ACE_TEXT_WIN32_FIND_DATA fdata;
@@ -229,6 +239,8 @@ namespace ACE_OS
// Solaris for intel uses an macro for stat(), this macro is a
// wrapper for _xstat().
ACE_OSCALL_RETURN (::_xstat (_STAT_VER, file, stp), int, -1);
+#elif defined (ACE_MQX)
+ return MQX_Filesystem::inst ().stat (file, stp);
#else
ACE_OSCALL_RETURN (ACE_STAT_FUNC_NAME (file, stp), int, -1);
#endif /* ACE_HAS_NONCONST_STAT */