summaryrefslogtreecommitdiff
path: root/mysys/my_lock.c
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-15 08:13:30 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-15 08:13:30 -0300
commit07e7b4d6fe590cb49a5009842d3153520f2e1a36 (patch)
tree2c9b96009bfea8eef82d21e14a61f7306827f917 /mysys/my_lock.c
parentef27448469171b0d7a045b19af378af9b514b6af (diff)
downloadmariadb-git-07e7b4d6fe590cb49a5009842d3153520f2e1a36.tar.gz
WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
Diffstat (limited to 'mysys/my_lock.c')
-rw-r--r--mysys/my_lock.c55
1 files changed, 3 insertions, 52 deletions
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index 1436c845286..8a28c7390c4 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -22,9 +22,6 @@
#undef NO_ALARM_LOOP
#endif
#include <my_alarm.h>
-#ifdef __NETWARE__
-#include <nks/fsio.h>
-#endif
#ifdef _WIN32
#define WIN_LOCK_INFINITE -1
@@ -145,9 +142,6 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
int value;
ALARM_VARIABLES;
#endif
-#ifdef __NETWARE__
- int nxErrno;
-#endif
DBUG_ENTER("my_lock");
DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %d",
@@ -158,47 +152,7 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
if (my_disable_locking)
DBUG_RETURN(0);
-#if defined(__NETWARE__)
- {
- NXSOffset_t nxLength = length;
- unsigned long nxLockFlags = 0;
-
- if (length == F_TO_EOF)
- {
- /* EOF is interpreted as a very large length. */
- nxLength = 0x7FFFFFFFFFFFFFFF;
- }
-
- if (locktype == F_UNLCK)
- {
- /* The lock flags are currently ignored by NKS. */
- if (!(nxErrno= NXFileRangeUnlock(fd, 0L, start, nxLength)))
- DBUG_RETURN(0);
- }
- else
- {
- if (locktype == F_RDLCK)
- {
- /* A read lock is mapped to a shared lock. */
- nxLockFlags = NX_RANGE_LOCK_SHARED;
- }
- else
- {
- /* A write lock is mapped to an exclusive lock. */
- nxLockFlags = NX_RANGE_LOCK_EXCL;
- }
-
- if (MyFlags & MY_DONT_WAIT)
- {
- /* Don't block on the lock. */
- nxLockFlags |= NX_RANGE_LOCK_TRYLOCK;
- }
-
- if (!(nxErrno= NXFileRangeLock(fd, nxLockFlags, start, nxLength)))
- DBUG_RETURN(0);
- }
- }
-#elif defined(_WIN32)
+#if defined(_WIN32)
{
int timeout_sec;
if (MyFlags & MY_DONT_WAIT)
@@ -257,12 +211,9 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
#endif /* HAVE_FCNTL */
#endif /* HAVE_LOCKING */
-#ifdef __NETWARE__
- my_errno = nxErrno;
-#else
- /* We got an error. We don't want EACCES errors */
+ /* We got an error. We don't want EACCES errors */
my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1;
-#endif
+
if (MyFlags & MY_WME)
{
if (locktype == F_UNLCK)