Do not try to change a const variable.
This commit is contained in:
parent
301194f8ea
commit
3f7e1e4b91
@ -2396,6 +2396,10 @@ Wed, 26 Nov 2008 14:09:08 +0100
|
|||||||
- When creating a varchar struct name braces must be discarded.
|
- When creating a varchar struct name braces must be discarded.
|
||||||
- Applied patch by Ron Mayer <rm_pg@cheapcomplexdevices.com> to merge
|
- Applied patch by Ron Mayer <rm_pg@cheapcomplexdevices.com> to merge
|
||||||
the new interval style into ecpg.
|
the new interval style into ecpg.
|
||||||
|
|
||||||
|
Mon, 15 Dec 2008 16:31:31 +0100
|
||||||
|
|
||||||
|
- Do not try to change a const variable in ecpg_log.
|
||||||
- Set pgtypes library version to 3.1.
|
- Set pgtypes library version to 3.1.
|
||||||
- Set compat library version to 3.1.
|
- Set compat library version to 3.1.
|
||||||
- Set ecpg library version to 6.2.
|
- Set ecpg library version to 6.2.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.44 2008/12/11 07:34:09 petere Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.45 2008/12/15 15:34:07 meskes Exp $ */
|
||||||
|
|
||||||
#define POSTGRES_ECPG_INTERNAL
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -242,26 +242,24 @@ ecpg_log(const char *format,...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
struct sqlca_t *sqlca = ECPGget_sqlca();
|
struct sqlca_t *sqlca = ECPGget_sqlca();
|
||||||
|
int bufsize = strlen(format) + 100;
|
||||||
|
char *f = (char *) malloc(bufsize),
|
||||||
|
*intl_format;
|
||||||
|
|
||||||
|
if (!simple_debug || f == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* internationalize the error message string */
|
/* internationalize the error message string */
|
||||||
format = ecpg_gettext(format);
|
intl_format = ecpg_gettext(format);
|
||||||
|
|
||||||
if (simple_debug)
|
|
||||||
{
|
|
||||||
int bufsize = strlen(format) + 100;
|
|
||||||
char *f = (char *) malloc(bufsize);
|
|
||||||
|
|
||||||
if (f == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* regression tests set this environment variable to get the same
|
* regression tests set this environment variable to get the same
|
||||||
* output for every run.
|
* output for every run.
|
||||||
*/
|
*/
|
||||||
if (ecpg_internal_regression_mode)
|
if (ecpg_internal_regression_mode)
|
||||||
snprintf(f, bufsize, "[NO_PID]: %s", format);
|
snprintf(f, bufsize, "[NO_PID]: %s", intl_format);
|
||||||
else
|
else
|
||||||
snprintf(f, bufsize, "[%d]: %s", (int) getpid(), format);
|
snprintf(f, bufsize, "[%d]: %s", (int) getpid(), intl_format);
|
||||||
|
|
||||||
#ifdef ENABLE_THREAD_SAFETY
|
#ifdef ENABLE_THREAD_SAFETY
|
||||||
pthread_mutex_lock(&debug_mutex);
|
pthread_mutex_lock(&debug_mutex);
|
||||||
@ -284,7 +282,6 @@ ecpg_log(const char *format,...)
|
|||||||
|
|
||||||
free(f);
|
free(f);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ECPGset_noind_null(enum ECPGttype type, void *ptr)
|
ECPGset_noind_null(enum ECPGttype type, void *ptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user