summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
commit97057115962d9dfbe989c799cff089aec5cbcc60 (patch)
tree55fa1ceccae107e55c0295dfe2174d04d41583fb /include/my_sys.h
parent81906cdf3805fe5fcea47fef11945f9adbcef4d8 (diff)
downloadmariadb-git-97057115962d9dfbe989c799cff089aec5cbcc60.tar.gz
WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 95689535be5..23c9b2da55f 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -197,7 +197,7 @@ extern void my_large_free(uchar *ptr);
#define my_alloca(SZ) alloca((size_t) (SZ))
#define my_afree(PTR) {}
#else
-#define my_alloca(SZ) my_malloc(SZ,MYF(0))
+#define my_alloca(SZ) my_malloc(SZ,MYF(MY_FAE))
#define my_afree(PTR) my_free(PTR)
#endif /* HAVE_ALLOCA */
@@ -824,6 +824,10 @@ extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t prealloc_size);
extern char *strdup_root(MEM_ROOT *root,const char *str);
+static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
+{
+ return str ? strdup_root(root, str) : 0;
+}
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
extern int get_defaults_options(int argc, char **argv,