diff options
author | monty@mashka.mysql.fi <> | 2003-01-21 21:07:59 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-01-21 21:07:59 +0200 |
commit | 25c393a12ea7264f265f958027d6e0a1735acc77 (patch) | |
tree | b3f7b07e6d74a88c6ef0b3e8f43bc27b784bb24d /innobase | |
parent | 6522ee6c9845cf61903592e9a36c78dc4f69f569 (diff) | |
download | mariadb-git-25c393a12ea7264f265f958027d6e0a1735acc77.tar.gz |
Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster.
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/dict/dict0dict.c | 3 | ||||
-rw-r--r-- | innobase/dict/dict0load.c | 4 | ||||
-rw-r--r-- | innobase/include/os0proc.h | 2 | ||||
-rw-r--r-- | innobase/os/os0proc.c | 12 | ||||
-rw-r--r-- | innobase/ut/ut0ut.c | 1 |
5 files changed, 12 insertions, 10 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index c70e848c5c8..9be10fe70d8 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2181,6 +2181,7 @@ dict_skip_word( /************************************************************************* Returns the number of opening brackets '(' subtracted by the number of closing brackets ')' between string and ptr. */ +#ifdef NOT_USED static int dict_bracket_count( @@ -2204,7 +2205,7 @@ dict_bracket_count( return(count); } - +#endif /************************************************************************* Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function should be called after diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index d8d426d2036..1070a8f5426 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -456,7 +456,7 @@ dict_load_indexes( ut_ad(len == 8); id = mach_read_from_8(field); - ut_a(0 == ut_strcmp("NAME", + ut_a(0 == ut_strcmp((void*) "NAME", dict_field_get_col( dict_index_get_nth_field( dict_table_get_first_index(sys_indexes), 4))->name)); @@ -515,7 +515,7 @@ dict_load_indexes( && ((type & DICT_CLUSTERED) || ((table == dict_sys->sys_tables) && (name_len == ut_strlen("ID_IND")) - && (0 == ut_memcmp(name_buf, "ID_IND", + && (0 == ut_memcmp(name_buf, (void*) "ID_IND", name_len))))) { /* The index was created in memory already in diff --git a/innobase/include/os0proc.h b/innobase/include/os0proc.h index 08510db4366..3d752df43a6 100644 --- a/innobase/include/os0proc.h +++ b/innobase/include/os0proc.h @@ -16,7 +16,7 @@ typedef void* os_process_t; typedef unsigned long int os_process_id_t; /* The cell type in os_awe_allocate_mem page info */ -#ifdef __NT__ +#if defined(__NT__) && defined(ULONG_PTR) typedef ULONG_PTR os_awe_t; #else typedef ulint os_awe_t; diff --git a/innobase/os/os0proc.c b/innobase/os/os0proc.c index 635c89c10a3..1497ee46b88 100644 --- a/innobase/os/os0proc.c +++ b/innobase/os/os0proc.c @@ -189,12 +189,12 @@ os_awe_allocate_physical_mem( #elif defined(__NT__) BOOL bResult; - ULONG_PTR NumberOfPages; /* Question: why does Windows + os_awe_t NumberOfPages; /* Question: why does Windows use the name ULONG_PTR for a scalar integer type? Maybe because we may also refer to &NumberOfPages? */ - ULONG_PTR NumberOfPagesInitial; + os_awe_t NumberOfPagesInitial; SYSTEM_INFO sSysInfo; int PFNArraySize; @@ -224,9 +224,9 @@ os_awe_allocate_physical_mem( /* Calculate the size of page_info for allocated physical pages */ - PFNArraySize = NumberOfPages * sizeof(ULONG_PTR); + PFNArraySize = NumberOfPages * sizeof(os_awe_t); - *page_info = (ULONG_PTR*)HeapAlloc(GetProcessHeap(), 0, PFNArraySize); + *page_info = (os_awe_t*)HeapAlloc(GetProcessHeap(), 0, PFNArraySize); if (*page_info == NULL) { fprintf(stderr, @@ -426,9 +426,9 @@ os_awe_map_physical_mem_to_window( #elif defined(__NT__) BOOL bResult; - ULONG_PTR n_pages; + os_awe_t n_pages; - n_pages = (ULONG_PTR)n_mem_pages; + n_pages = (os_awe_t)n_mem_pages; if (!(ptr >= os_awe_window)) { fprintf(stderr, diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c index ff5d11d84ed..31a137b5fac 100644 --- a/innobase/ut/ut0ut.c +++ b/innobase/ut/ut0ut.c @@ -13,6 +13,7 @@ Created 5/11/1994 Heikki Tuuri #endif #include <stdarg.h> +#include <string.h> #include "ut0sort.h" |