From 0716bf4d0ef4ec4dd4eb945c2db54f1e9962f401 Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Wed, 31 Oct 2001 20:28:43 +0200 Subject: Portability fixes --- innobase/os/os0file.c | 13 ++++++++++--- innobase/ut/ut0mem.c | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'innobase') 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); -- cgit v1.2.1