summaryrefslogtreecommitdiff
path: root/mysys/my_lib.c
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@oracle.com>2011-01-11 10:07:37 +0100
committerMagne Mahre <magne.mahre@oracle.com>2011-01-11 10:07:37 +0100
commit8ede0759c30bb49025b466a69951d5f36d2b6b92 (patch)
tree5aa89e155e701ad4709cbd1e6a9efc5b5f1bb755 /mysys/my_lib.c
parent5511a9d7ba6e60cfff30ae414155e8aba6e3d30a (diff)
downloadmariadb-git-8ede0759c30bb49025b466a69951d5f36d2b6b92.tar.gz
Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'. As of MySQL 5.5, we no longer support non-threaded builds. This patch removes all references to the obsolete THREAD and THREAD_SAFE_CLIENT preprocessor symbols. These were used to distinguish between threaded and non-threaded builds.
Diffstat (limited to 'mysys/my_lib.c')
-rw-r--r--mysys/my_lib.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 890ff0b5dd1..06f9521a664 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -41,7 +41,7 @@
# endif
#endif
-#if defined(THREAD) && defined(HAVE_READDIR_R)
+#if defined(HAVE_READDIR_R)
#define READDIR(A,B,C) ((errno=readdir_r(A,B,&C)) != 0 || !C)
#else
#define READDIR(A,B,C) (!(C=readdir(A)))
@@ -97,13 +97,12 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN+1],*tmp_file;
-#ifdef THREAD
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
-#endif
+
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags));
-#if defined(THREAD) && !defined(HAVE_READDIR_R)
+#if !defined(HAVE_READDIR_R)
mysql_mutex_lock(&THR_LOCK_open);
#endif
@@ -135,11 +134,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
tmp_file=strend(tmp_path);
-#ifdef THREAD
dp= (struct dirent*) dirent_tmp;
-#else
- dp=0;
-#endif
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
@@ -166,7 +161,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
}
(void) closedir(dirp);
-#if defined(THREAD) && !defined(HAVE_READDIR_R)
+#if !defined(HAVE_READDIR_R)
mysql_mutex_unlock(&THR_LOCK_open);
#endif
result->dir_entry= (FILEINFO *)dir_entries_storage->buffer;
@@ -178,7 +173,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
DBUG_RETURN(result);
error:
-#if defined(THREAD) && !defined(HAVE_READDIR_R)
+#if !defined(HAVE_READDIR_R)
mysql_mutex_unlock(&THR_LOCK_open);
#endif
my_errno=errno;