From: Sandro Santilli Date: Mon, 4 May 2015 07:57:43 +0000 (+0000) Subject: Rename "errmsg" variable to avoid clash with PostgreSQL global X-Git-Tag: 2.2.0rc1~531 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fec5a162788ffd40840e54141ff2ba3af981e758;p=postgis Rename "errmsg" variable to avoid clash with PostgreSQL global Patch by Haribabu Kommi git-svn-id: http://svn.osgeo.org/postgis/trunk@13472 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/long_xact.c b/postgis/long_xact.c index c2b7c2f44..bbcaf96ca 100644 --- a/postgis/long_xact.c +++ b/postgis/long_xact.c @@ -49,7 +49,7 @@ Datum check_authorization(PG_FUNCTION_ARGS) char *authtable = "authorization_table"; const char *op; #define ERRMSGLEN 256 - char errmsg[ERRMSGLEN]; + char err_msg[ERRMSGLEN]; /* Make sure trigdata is pointing at what I expect */ @@ -155,14 +155,14 @@ Datum check_authorization(PG_FUNCTION_ARGS) fail: - snprintf(errmsg, ERRMSGLEN, "%s where \"%s\" = '%s' requires authorization '%s'", + snprintf(err_msg, ERRMSGLEN, "%s where \"%s\" = '%s' requires authorization '%s'", op, colname, pk_id, lockcode); - errmsg[ERRMSGLEN-1] = '\0'; + err_msg[ERRMSGLEN-1] = '\0'; #ifdef ABORT_ON_AUTH_FAILURE - elog(ERROR, "%s", errmsg); + elog(ERROR, "%s", err_msg); #else - elog(NOTICE, "%s", errmsg); + elog(NOTICE, "%s", err_msg); #endif SPI_finish();