~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg_print.cc

  • Committer: Monty Taylor
  • Date: 2010-08-21 00:40:40 UTC
  • mfrom: (1723.1.11 build)
  • Revision ID: mordred@inaugust.com-20100821004040-udj7wpfxtj0rgak1
Rollup of small patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include "config.h"
26
26
 
 
27
#include <drizzled/definitions.h>
27
28
#include <drizzled/errmsg_print.h>
28
29
#include <drizzled/plugin/error_message.h>
29
30
 
35
36
 
36
37
void sql_perror(const char *message)
37
38
{
38
 
  // is stderr threadsafe?
39
 
  errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s", message, strerror(errno));
 
39
  char errmsg[STRERROR_MAX];
 
40
  strerror_r(errno, errmsg, sizeof(errmsg));
 
41
  errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s", message, errmsg);
40
42
}
41
43
 
42
44
bool errmsg_printf (int priority, char const *format, ...)