Commit 0716bf4d authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Portability fixes

parent d89690e6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@
#define RESOLVE_VERSION "2.0"
 
#include <global.h>
#include <m_ctype.h>
#include <my_sys.h>
#include <m_string.h>
#include <sys/types.h>
#include <sys/socket.h>
#ifndef HAVE_BROKEN_NETINET_INCLUDES
@@ -27,8 +30,6 @@
#endif
#include <arpa/inet.h>
#include <netdb.h>
#include <m_ctype.h>
#include <my_sys.h>
#include <getopt.h>

#if !defined(_AIX) && !defined(HAVE_UNIXWARE7_THREADS) && !defined(HAVE_UNIXWARE7_POSIX) && !defined(h_errno)
+10 −3
Original line number Diff line number Diff line
@@ -817,7 +817,9 @@ os_file_read(
		return(TRUE);
	}
#endif	
#ifdef __WIN__
error_handling:
#endif
	retry = os_file_handle_error(file, NULL); 

	if (retry) {
@@ -906,7 +908,9 @@ os_file_write(
		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 @@ os_aio_simulated_handle(
		}
	}

	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 @@ os_aio_simulated_handle(
	}

	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 @@ os_aio_simulated_handle(

	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]);

+2 −2
Original line number Diff line number Diff line
@@ -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);
+3 −2
Original line number Diff line number Diff line
@@ -260,6 +260,7 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
    ((ulong) reclength * (1L << (pointer*8)));
  share.base.max_key_file_length= (share.base.key_reflength == 3 ?
				   NI_POS_ERROR :
				   (ulong)
				   (1L << (share.base.key_reflength*8))*512);
  share.base.min_block_length=
    (share.base.pack_reclength+3 < N_EXTEND_BLOCK_LENGTH &&
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ static void usage(void)
  -?, --help		display this help and exit\n\
  -V, --version		output version information and exit\n");
  print_defaults("my",load_default_groups);
};
}

	/* reads options */
	/* Initiates DEBUG - but no debugging here ! */
Loading