summaryrefslogtreecommitdiff
path: root/sal/osl/unx/uunxapi.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/osl/unx/uunxapi.hxx')
-rw-r--r--sal/osl/unx/uunxapi.hxx152
1 files changed, 0 insertions, 152 deletions
diff --git a/sal/osl/unx/uunxapi.hxx b/sal/osl/unx/uunxapi.hxx
index 1c7a022a7c9a..f182b755e53b 100644
--- a/sal/osl/unx/uunxapi.hxx
+++ b/sal/osl/unx/uunxapi.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SAL_OSL_UNX_UUNXAPI_HXX
#define INCLUDED_SAL_OSL_UNX_UUNXAPI_HXX
-#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -28,7 +27,6 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
-#include <sal/log.hxx>
int stat_c(const char *cpPath, struct stat* buf);
@@ -74,156 +72,6 @@ namespace osl
int lstat(const OString& strPath, struct stat& buf);
int mkdir(const OString& aPath, mode_t aMode);
-
- // The following are for debugging output only, don't bother getting upset about performance etc.
- inline OString openFlagsToString(int flags)
- {
- OString result;
- switch (flags & O_ACCMODE)
- {
- case O_RDONLY:
- result = "O_RDONLY";
- break;
- case O_WRONLY:
- result = "O_WRONLY";
- break;
- break;
- case O_RDWR:
- result = "O_RDWR";
- break;
- }
- if (flags & O_CREAT)
- result += "|O_CREAT";
- if (flags & O_EXCL)
- result += "|O_EXCL";
- if (flags & O_NOCTTY)
- result += "|O_NOCTTY";
- if (flags & O_TRUNC)
- result += "|O_TRUNC";
- if (flags & O_NONBLOCK)
- result += "|O_NONBLOCK";
- if (flags & O_NONBLOCK)
- result += "|O_NONBLOCK";
- if ((flags & O_SYNC) == O_SYNC)
- result += "|O_SYNC";
- if (flags & O_ASYNC)
- result += "|O_ASYNC";
-
-#if defined __O_LARGEFILE
- if (flags & __O_LARGEFILE)
- result += "|O_LARGEFILE";
-#endif
-
-#if defined __O_DIRECTORY
- if (flags & __O_DIRECTORY)
- result += "|O_DIRECTORY";
-#elif defined O_DIRECTORY
- if (flags & O_DIRECTORY)
- result += "|O_DIRECTORY";
-#endif
-
-#if defined __O_NOFOLLOW
- if (flags & __O_NOFOLLOW)
- result += "|O_NOFOLLOW";
-#elif defined O_NOFOLLOW
- if (flags & O_NOFOLLOW)
- result += "|O_NOFOLLOW";
-#endif
-
-#if defined __O_CLOEXEC
- if (flags & __O_CLOEXEC)
- result += "|O_CLOEXEC";
-#elif defined O_CLOEXEC
- if (flags & O_CLOEXEC)
- result += "|O_CLOEXEC";
-#endif
-
-#if defined __O_DIRECT
- if (flags & __O_DIRECT)
- result += "|O_DIRECT";
-#endif
-
-#if defined __O_NOATIME
- if (flags & __O_NOATIME)
- result += "|O_NOATIME";
-#endif
-
-#if defined __O_PATH
- if (flags & __O_PATH)
- result += "|O_PATH";
-#endif
-
-#if defined __O_DSYNC
- if (flags & __O_DSYNC)
- result += "|O_DSYNC";
-#endif
-
-#if defined __O_TMPFILE
- if ((flags & __O_TMPFILE) == __O_TMPFILE)
- result += "|O_TMPFILE";
-#endif
-
- return result;
- }
-
- inline OString openModeToString(int mode)
- {
- if (mode == 0)
- return "0";
- else
- return "0" + OString::number(mode, 8);
- }
-
- inline OString accessModeToString(int mode)
- {
- if (mode == F_OK)
- return "F_OK";
- OString result;
- if (mode & R_OK)
- result = "R_OK";
- if (mode & W_OK)
- {
- if (!result.isEmpty())
- result += "|";
- result += "W_OK";
- }
- if (mode & X_OK)
- {
- if (!result.isEmpty())
- result += "|";
- result += "X_OK";
- }
- return result;
- }
-
-#if defined SAL_LOG_INFO
- void registerPathForFd(int fd, const char *path);
-
- void unregisterPathForFd(int fd);
-
- OUString fdAndPath(int fd);
-
- void dumpFdToPathMap();
-#else
- inline void registerPathForFd(int, const char *)
- {
- }
-
- inline void unregisterPathForFd(int)
- {
- }
-
- inline OUString fdAndPath(int)
- {
- return "";
- }
-
- inline void dumpFdToPathMap()
- {
- }
-#endif
-
-
} // end namespace osl
#endif // INCLUDED_SAL_OSL_UNX_UUNXAPI_HXX