示例#1
0
static void __bionic_format_dlerror(const char* msg, const char* detail) {
  char* buffer = __get_thread()->dlerror_buffer;
  strlcpy(buffer, msg, __BIONIC_DLERROR_BUFFER_SIZE);
  if (detail != NULL) {
    strlcat(buffer, ": ", __BIONIC_DLERROR_BUFFER_SIZE);
    strlcat(buffer, detail, __BIONIC_DLERROR_BUFFER_SIZE);
  }

  __bionic_set_dlerror(buffer);
}
示例#2
0
const char* dlerror() {
  const char* old_value = __bionic_set_dlerror(NULL);
  return old_value;
}
示例#3
0
const char* dlerror() {
  const char* old_value = __bionic_set_dlerror(nullptr);
  return old_value;
}