24#ifndef MY_BASENAME_INCLUDED
25#define MY_BASENAME_INCLUDED
35 return (index == -1 ||
path[index] ==
'/' ||
path[index] ==
'\\')
40#define MY_BASENAME (&__FILE__[basename_index(__FILE__, sizeof(__FILE__) - 1)])
42#ifndef LOG_SUBSYSTEM_TAG
44 return (
path[0] ==
'r' &&
path[1] ==
'p' &&
path[2] ==
'l' &&
path[3] ==
'_')
50 return (
path[index] ==
'/' ||
path[index] ==
'\\')
55#define LOG_SUBSYSTEM_TAG \
56 basename_prefix_eval( \
57 &__FILE__[basename_prefix_find(__FILE__, sizeof(__FILE__) - 1)])
constexpr const char * basename_prefix_eval(const char *const path)
Definition: my_basename.h:43
static constexpr int basename_index(const char *const path, const int index)
Definition: my_basename.h:34
constexpr int basename_prefix_find(const char *const path, const int index)
Definition: my_basename.h:49
static char * path
Definition: mysqldump.cc:137