aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regerror.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-02-14 17:33:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-02-14 17:33:37 +0000
commitdf1e965e12cdd48c11057ee6e15346ee2b8b02f5 (patch)
treeca6644f5fc9e7b0c6d21432cddbe90d7ac8ddd14 /src/backend/regex/regerror.c
parent423abf4d6aef113501c880edd3e41975860f2a31 (diff)
downloadpostgresql-df1e965e12cdd48c11057ee6e15346ee2b8b02f5.tar.gz
postgresql-df1e965e12cdd48c11057ee6e15346ee2b8b02f5.zip
Sync our regex code with upstream changes since last time we did this, which
was Tcl 8.4.8. The main changes are to remove the never-fully-implemented code for multi-character collating elements, and to const-ify some stuff a bit more fully. In combination with the recent security patch, this commit brings us into line with Tcl 8.5.0. Note that I didn't make any effort to duplicate a lot of cosmetic changes that they made to bring their copy into line with their own style guidelines, such as adding braces around single-line IF bodies. Most of those we either had done already (such as ANSI-fication of function headers) or there is no point because pgindent would undo the change anyway.
Diffstat (limited to 'src/backend/regex/regerror.c')
-rw-r--r--src/backend/regex/regerror.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/regex/regerror.c b/src/backend/regex/regerror.c
index 3b204463507..dfcb462e011 100644
--- a/src/backend/regex/regerror.c
+++ b/src/backend/regex/regerror.c
@@ -27,7 +27,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/src/backend/regex/regerror.c,v 1.27 2003/11/29 19:51:55 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/regex/regerror.c,v 1.28 2008/02/14 17:33:37 tgl Exp $
*
*/
@@ -40,8 +40,8 @@ static char unk[] = "*** unknown regex error code 0x%x ***";
static struct rerr
{
int code;
- char *name;
- char *explain;
+ const char *name;
+ const char *explain;
} rerrs[] =
{
@@ -63,7 +63,7 @@ pg_regerror(int errcode, /* error code, or REG_ATOI or REG_ITOA */
size_t errbuf_size) /* available space in errbuf, can be 0 */
{
struct rerr *r;
- char *msg;
+ const char *msg;
char convbuf[sizeof(unk) + 50]; /* 50 = plenty for int */
size_t len;
int icode;