summaryrefslogtreecommitdiff
path: root/indra/llvfs/llvfs.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-07 20:54:41 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-07 20:54:41 +0300
commitfef6c1f51ef13b4a50fd6eb2c9df2ec61b5d0ab4 (patch)
tree4331c683f89b706077ded9d34c1c1f179d887e3c /indra/llvfs/llvfs.cpp
parent76ab0e277588d8f36e2188a8a67628b74eae50a7 (diff)
parent4623b822386accfae5907c88099c2a88377a0271 (diff)
Merge branch 'master' into DRTVWR-516-maint
Diffstat (limited to 'indra/llvfs/llvfs.cpp')
-rw-r--r--indra/llvfs/llvfs.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 617056d94d..2c64bf563e 100644
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -33,10 +33,6 @@
#include <map>
#if LL_WINDOWS
#include <share.h>
-#elif LL_SOLARIS
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
#else
#include <sys/file.h>
#endif
@@ -2146,12 +2142,6 @@ LLFILE *LLVFS::openAndLock(const std::string& filename, const char* mode, BOOL r
int fd;
// first test the lock in a non-destructive way
-#if LL_SOLARIS
- struct flock fl;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 1;
-#else // !LL_SOLARIS
if (strchr(mode, 'w') != NULL)
{
fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
@@ -2167,19 +2157,13 @@ LLFILE *LLVFS::openAndLock(const std::string& filename, const char* mode, BOOL r
fclose(fp);
}
}
-#endif // !LL_SOLARIS
// now actually open the file for use
fp = LLFile::fopen(filename, mode); /* Flawfinder: ignore */
if (fp)
{
fd = fileno(fp);
-#if LL_SOLARIS
- fl.l_type = read_lock ? F_RDLCK : F_WRLCK;
- if (fcntl(fd, F_SETLK, &fl) == -1)
-#else
if (flock(fd, (read_lock ? LOCK_SH : LOCK_EX) | LOCK_NB) == -1)
-#endif
{
fclose(fp);
fp = NULL;
@@ -2207,14 +2191,6 @@ void LLVFS::unlockAndClose(LLFILE *fp)
flock(fd, LOCK_UN);
#endif
*/
-#if LL_SOLARIS
- struct flock fl;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 1;
- fl.l_type = F_UNLCK;
- fcntl(fileno(fp), F_SETLK, &fl);
-#endif
fclose(fp);
}
}