summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-10-31 20:28:43 +0200
committermonty@hundin.mysql.fi <>2001-10-31 20:28:43 +0200
commit0716bf4d0ef4ec4dd4eb945c2db54f1e9962f401 (patch)
tree92b080e5371729d9f2b8777445095eb5e0545575 /innobase
parentd89690e606d38e5b0f1d82117cd26a5264325088 (diff)
downloadmariadb-git-0716bf4d0ef4ec4dd4eb945c2db54f1e9962f401.tar.gz
Portability fixes
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0file.c13
-rw-r--r--innobase/ut/ut0mem.c4
2 files changed, 12 insertions, 5 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 60d65186e11..9fecf2c04fd 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -817,7 +817,9 @@ try_again:
return(TRUE);
}
#endif
+#ifdef __WIN__
error_handling:
+#endif
retry = os_file_handle_error(file, NULL);
if (retry) {
@@ -906,7 +908,9 @@ try_again:
return(TRUE);
}
#endif
+#ifdef __WIN__
error_handling:
+#endif
retry = os_file_handle_error(file, name);
if (retry) {
@@ -1150,6 +1154,8 @@ os_aio_get_array_and_local_segment(
/***********************************************************************
Gets an integer value designating a specified aio array. This is used
to give numbers to signals in Posix aio. */
+
+#if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO)
static
ulint
os_aio_get_array_no(
@@ -1203,6 +1209,7 @@ os_aio_get_array_from_no(
return(NULL);
}
}
+#endif /* if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO) */
/***********************************************************************
Requests for a slot in the aio array. If no slot is available, waits until
@@ -1955,7 +1962,7 @@ consecutive_loop:
}
}
- srv_io_thread_op_info[global_segment] = "doing file i/o";
+ srv_io_thread_op_info[global_segment] = (char*) "doing file i/o";
/* Do the i/o with ordinary, synchronous i/o functions: */
if (slot->type == OS_FILE_WRITE) {
@@ -1967,7 +1974,7 @@ consecutive_loop:
}
ut_a(ret);
- srv_io_thread_op_info[global_segment] = "file i/o done";
+ srv_io_thread_op_info[global_segment] = (char*) "file i/o done";
/* printf("aio: %lu consecutive %lu:th segment, first offs %lu blocks\n",
n_consecutive, global_segment, slot->offset
@@ -2024,7 +2031,7 @@ wait_for_io:
os_mutex_exit(array->mutex);
- srv_io_thread_op_info[global_segment] = "waiting for i/o request";
+ srv_io_thread_op_info[global_segment] = (char*) "waiting for i/o request";
os_event_wait(os_aio_segment_wait_events[global_segment]);
diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c
index 630bd3a9b71..84a79d39556 100644
--- a/innobase/ut/ut0mem.c
+++ b/innobase/ut/ut0mem.c
@@ -78,7 +78,7 @@ ut_malloc_low(
fprintf(stderr,
"InnoDB: Fatal error: cannot allocate %lu bytes of\n"
"InnoDB: memory with malloc! Total allocated memory\n"
- "InnoDB: by InnoDB %lu bytes. Operating system errno: %lu\n"
+ "InnoDB: by InnoDB %lu bytes. Operating system errno: %d\n"
"InnoDB: Cannot continue operation!\n"
"InnoDB: Check if you should increase the swap file or\n"
"InnoDB: ulimits of your operating system.\n",
@@ -155,7 +155,7 @@ ut_free_all_mem(void)
os_fast_mutex_lock(&ut_list_mutex);
- while (block = UT_LIST_GET_FIRST(ut_mem_block_list)) {
+ while ((block = UT_LIST_GET_FIRST(ut_mem_block_list))) {
ut_a(block->magic_n == UT_MEM_MAGIC_N);
ut_a(ut_total_allocated_memory >= block->size);