From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 3 16:10:24 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC6E316A41F for ; Wed, 3 Aug 2005 16:10:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99CDD43D49 for ; Wed, 3 Aug 2005 16:10:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j73GAMcx032544 for ; Wed, 3 Aug 2005 16:10:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j73GAMRe032542; Wed, 3 Aug 2005 16:10:22 GMT (envelope-from gnats) Resent-Date: Wed, 3 Aug 2005 16:10:22 GMT Resent-Message-Id: <200508031610.j73GAMRe032542@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dominik Brettnacher Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED0DD16A41F for ; Wed, 3 Aug 2005 16:08:47 +0000 (GMT) (envelope-from root@jail.teresto.net) Received: from jail.teresto.net (jail.teresto.net [212.88.134.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7634843D48 for ; Wed, 3 Aug 2005 16:08:47 +0000 (GMT) (envelope-from root@jail.teresto.net) Received: from root by jail.teresto.net with local (Exim 4.42 (FreeBSD)) id 1E0LnS-000Mdt-Ep for FreeBSD-gnats-submit@freebsd.org; Wed, 03 Aug 2005 18:08:46 +0200 Received: from truman.teresto.net ([212.88.130.253] helo=saargate.de) by jail.teresto.net with esmtp (Exim 4.42 (FreeBSD)) id 1E0L6U-000L9N-NG for FreeBSD-gnats-submit@freebsd.org; Wed, 03 Aug 2005 17:24:22 +0200 Received: from saargate.de (localhost [127.0.0.1]) by saargate.de (8.13.3/8.13.3) with ESMTP id j73FRVcq044364 for ; Wed, 3 Aug 2005 17:27:31 +0200 (CEST) (envelope-from domi@destiny.office.mzg.teresto.net) Received: (from domi@localhost) by saargate.de (8.13.3/8.13.3/Submit) id j73FRU85044361; Wed, 3 Aug 2005 17:27:30 +0200 (CEST) (envelope-from domi) Message-Id: <200508031527.j73FRU85044361@saargate.de> Date: Wed, 3 Aug 2005 17:27:30 +0200 (CEST) From: Dominik Brettnacher To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/84522: databases/gtksql syntax error fixed X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dominik Brettnacher List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2005 16:10:25 -0000 >Number: 84522 >Category: ports >Synopsis: databases/gtksql syntax error fixed >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Aug 03 16:10:22 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Dominik Brettnacher >Release: FreeBSD 5.4-RC1 i386 >Organization: >Environment: System: FreeBSD saargate.de 5.4-RC1 FreeBSD 5.4-RC1 #0: Sun Apr 3 15:40:32 UTC 2005 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: databases/gtksql failed to build with WITH_PGSQL=yes (i.e. with support for PostgreSQL) because of multi-line string literals in the C source -- newer gcc versions don't support multi-line literals. >How-To-Repeat: >Fix: diff -urN /usr/ports/databases/gtksql/files/patch-postgres.c gtksql/files/patch-postgres.c --- /usr/ports/databases/gtksql/files/patch-postgres.c Sat Apr 21 13:43:04 2001 +++ gtksql/files/patch-postgres.c Wed Aug 3 17:23:47 2005 @@ -1,5 +1,5 @@ ---- postgres.c.orig Sat Apr 21 19:16:37 2001 -+++ postgres.c Sat Apr 21 19:16:47 2001 +--- postgres.c.orig Sat Jun 5 15:05:36 1999 ++++ postgres.c Wed Aug 3 17:22:55 2005 @@ -18,7 +18,7 @@ #include @@ -9,3 +9,47 @@ #include "common.h" #include "status.h" +@@ -129,14 +129,7 @@ + PGresult *table_info; + char query[512]; + +- sprintf(query, "SELECT a.attnum, a.attname, t.typname, a.attlen, +- a.atttypmod, a.attnotnull, a.atthasdef +- FROM pg_class c, pg_attribute a, pg_type t +- WHERE c.relname = '%s' AND +- a.attnum > 0 AND +- a.attrelid = c.oid AND +- a.atttypid = t.oid +- ORDER BY attnum", tbf->name); ++ sprintf(query, "SELECT a.attnum, a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef FROM pg_class c, pg_attribute a, pg_type t WHERE c.relname = '%s' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid ORDER BY attnum", tbf->name); + + table_info = PQexec(conn, query); + if ((table_info == NULL) || +@@ -183,11 +176,7 @@ + if (rnotnull[0] == 't') + strcat(type_str, " not null"); + if (rhasdef[0] == 't') { +- sprintf(buf, "SELECT d.adsrc +- FROM pg_attrdef d, pg_class c +- WHERE c.relname = '%s' AND +- c.oid = d.adrelid AND +- d.adnum = %s", ++ sprintf(buf, "SELECT d.adsrc FROM pg_attrdef d, pg_class c WHERE c.relname = '%s' AND c.oid = d.adrelid AND d.adnum = %s", + tbf->name, PQgetvalue(table_info, i, 0)); + table_info2 = PQexec(conn, buf); + if ((table_info2 == NULL) || +@@ -240,13 +229,7 @@ + PGresult *tables; + char query[512]; + +- sprintf(query, "SELECT usename, relname, relkind, relhasrules +- FROM pg_class, pg_user +- WHERE relkind = 'r' AND +- relname !~ '^pg_' AND +- relname !~ '^xin[vx][0-9]+' AND +- usesysid = relowner +- ORDER BY relname"); ++ sprintf(query, "SELECT usename, relname, relkind, relhasrules FROM pg_class, pg_user WHERE relkind = 'r' AND relname !~ '^pg_' AND relname !~ '^xin[vx][0-9]+' AND usesysid = relowner ORDER BY relname"); + + tables = PQexec(conn->conn, query); + if ((tables == NULL) || (PQresultStatus(tables) != PGRES_TUPLES_OK)) { >Release-Note: >Audit-Trail: >Unformatted: