summaryrefslogtreecommitdiff
path: root/include/my_alloc.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-31 12:29:54 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-31 12:29:54 -0300
commit5dec0c963713822cafc5f2f65b485e8846938318 (patch)
treebbbd0851e788a87bdf80dacc828f8de102b381b4 /include/my_alloc.h
parent7e84f28c74e6e75f2093fa7e21b6a2b3781b9fe9 (diff)
downloadmariadb-git-5dec0c963713822cafc5f2f65b485e8846938318.tar.gz
Bug#53445: Build with -Wall and fix warnings that it generates
Fix various mismatches between function's language linkage. Any particular function that is declared in C++ but should be callable from C must have C linkage. Note that function types with different linkages are also distinct. Thus, if a function type is declared in C code, it will have C linkage (same if declared in a extern "C" block).
Diffstat (limited to 'include/my_alloc.h')
-rw-r--r--include/my_alloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/my_alloc.h b/include/my_alloc.h
index 93b7438a1df..dbf104bda9a 100644
--- a/include/my_alloc.h
+++ b/include/my_alloc.h
@@ -23,6 +23,8 @@
#define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+C_MODE_START
+
typedef struct st_used_mem
{ /* struct for once_alloc (block) */
struct st_used_mem *next; /* Next block in use */
@@ -48,4 +50,7 @@ typedef struct st_mem_root
void (*error_handler)(void);
} MEM_ROOT;
+
+C_MODE_END
+
#endif