summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/my_getopt.h5
-rw-r--r--include/my_global.h4
-rw-r--r--include/my_sys.h12
-rw-r--r--include/my_time.h2
-rw-r--r--include/thr_lock.h2
5 files changed, 15 insertions, 10 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 14f8e6df95b..50ebe9190d8 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -75,8 +75,9 @@ extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint
const struct my_option *));
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
- bool *fix);
-longlong getopt_ll_limit_value(longlong, const struct my_option *,bool *fix);
+ my_bool *fix);
+longlong getopt_ll_limit_value(longlong, const struct my_option *,
+ my_bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
C_MODE_END
diff --git a/include/my_global.h b/include/my_global.h
index 4b0786aa826..ab960a9e6cd 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1508,4 +1508,8 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
+#if !defined(__cplusplus) && !defined(bool)
+#define bool In_C_you_should_use_my_bool_instead()
+#endif
+
#endif /* my_global_h */
diff --git a/include/my_sys.h b/include/my_sys.h
index ee79806c40e..57711b7ae82 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -919,12 +919,12 @@ extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
uint cs_flags, myf my_flags);
-extern bool resolve_charset(const char *cs_name,
- CHARSET_INFO *default_cs,
- CHARSET_INFO **cs);
-extern bool resolve_collation(const char *cl_name,
- CHARSET_INFO *default_cl,
- CHARSET_INFO **cl);
+extern my_bool resolve_charset(const char *cs_name,
+ CHARSET_INFO *default_cs,
+ CHARSET_INFO **cs);
+extern my_bool resolve_collation(const char *cl_name,
+ CHARSET_INFO *default_cl,
+ CHARSET_INFO **cl);
extern void free_charsets(void);
extern char *get_charsets_dir(char *buf);
diff --git a/include/my_time.h b/include/my_time.h
index e3bdb58e5c2..af3fc103530 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -111,7 +111,7 @@ void init_time(void);
TRUE The MYSQL_TIME value is definitely out of range
*/
-static inline bool validate_timestamp_range(const MYSQL_TIME *t)
+static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
{
if ((t->year > TIMESTAMP_MAX_YEAR || t->year < TIMESTAMP_MIN_YEAR) ||
(t->year == TIMESTAMP_MAX_YEAR && (t->month > 1 || t->day > 19)) ||
diff --git a/include/thr_lock.h b/include/thr_lock.h
index 74d65c2fa7a..a4ca6e6ddf2 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -148,7 +148,7 @@ void thr_unlock(THR_LOCK_DATA *data);
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_OWNER *owner);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
-void thr_abort_locks(THR_LOCK *lock, bool upgrade_lock);
+void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
void thr_print_locks(void); /* For debugging */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);