debian/0000755000000000000000000000000012206211361007160 5ustar debian/copyright0000644000000000000000000002054112206211361011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: tdbc Source: http://sf.net/tcl/ Upstream-Contact: tcl-tdbc@lists.sourceforge.net Copyright: Copyright (c) 2008 by Kevin B. Kenny License: Tcl-license-terms Files: * Copyright: Copyright (c) 2008 by Kevin B. Kenny License: This software is copyrighted by Kevin B. Kenny, and by other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. . The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. . IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. . GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. Files: tclconfig/tcl.m4 Copyright: Copyright (c) 1999-2000 Ajuba Solutions. Copyright (c) 2002-2005 ActiveState Corporation. License: Tcl-license-terms Files: tclconfig/depcomp Copyright: Copyright 1999, 2000 Free Software Foundation, Inc. Originally written by Alexandre Oliva . License: GPL-2+ Files: tclconfig/install-sh Copyright: Copyright (C) 1994 X Consortium License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from the X Consor- tium. . FSF changes to this file are in the public domain. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . As a special exception, the respective Autoconf Macro's copyright owner gives unlimited permission to copy, distribute and modify the configure scripts that are the output of Autoconf when processing the Macro. You need not follow the terms of the GNU General Public License when using or distributing such scripts, even though portions of the text of the Macro appear in them. The GNU General Public License (GPL) does govern all other use of the material that constitutes the Autoconf Macro. . This special exception to the GPL applies to versions of the Autoconf Macro released by the Autoconf Macro Archive. When you make and distribute a modified version of the Autoconf Macro, you may extend this special exception to the GPL to apply to your modified version as well. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: Tcl-license-terms This software is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState Corporation and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. . The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. . IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. . GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. debian/patches/0000755000000000000000000000000012206211361010607 5ustar debian/patches/fakepq.patch0000644000000000000000000000224512206211361013102 0ustar Description: pointer to integer assignment potentially unsafe Similarily to the patch for tdbcpostgres.c, definitions of data type to be used for storing pointer values are defined TDBC_PTRINT_T which is intptr_t for platforms supporting Author: Massimo Manghi Bug: http://core.tcl.tk/tdbcpostgres/tktview/582ee0100ceca8d0e520339914339c8c9e75a3bf Last-Update: 2013-08-23 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/generic/fakepq.h +++ b/generic/fakepq.h @@ -13,6 +13,18 @@ *----------------------------------------------------------------------------- */ +#ifdef HAVE_STDINT_H +#include +#endif + +/* we typedef TDBC_INTPTR_T */ + +#ifdef HAVE_STDINT_H +typedef intptr_t TDBC_INTPTR_T; +#else +typedef int TDBC_INTPTR_T; +#endif + #ifndef FAKEPQ_H_INCLUDED #define FAKEPQ_H_INCLUDED @@ -31,7 +43,12 @@ PGRES_NONFATAL_ERROR=6, PGRES_FATAL_ERROR=7, } ExecStatusType; + +#ifdef HAVE_STDINT_H +typedef TDBC_INTPTR_T Oid; +#else typedef unsigned int Oid; +#endif typedef struct pg_conn PGconn; typedef struct pg_result PGresult; typedef void (*PQnoticeProcessor)(void*, const PGresult*); debian/patches/series0000644000000000000000000000004012206211361012016 0ustar tdbcpostgres.patch fakepq.patch debian/patches/tdbcpostgres.patch0000644000000000000000000000366112206211361014341 0ustar Description: patching pointer to integer assignment potentially unsafe A TDBC_INTPTR_T datatype is defined as intptr_t if is supported, otherwise the original int datatype is used Author: Massimo Manghi Bug: http://core.tcl.tk/tdbcpostgres/tktview/582ee0100ceca8d0e520339914339c8c9e75a3bf Last-Update: 2013-08-23 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/generic/tdbcpostgres.c +++ b/generic/tdbcpostgres.c @@ -53,6 +53,7 @@ #define snprintf _snprintf #endif + /* Static data contained within this file */ static Tcl_Mutex pgMutex; /* Mutex protecting per-process structures */ @@ -2086,7 +2087,8 @@ char numbuf[16]; for (i = 0; i < fieldCount; ++i) { int new; - int count = 1; + TDBC_INTPTR_T count = 1; + Tcl_Obj* nameObj; Tcl_HashEntry* entry; fieldName = PQfname(result, i); @@ -2095,10 +2097,10 @@ entry = Tcl_CreateHashEntry(&names, fieldName, &new); while (!new) { - count = (int) Tcl_GetHashValue(entry); + count = (TDBC_INTPTR_T) Tcl_GetHashValue(entry); ++count; Tcl_SetHashValue(entry, (ClientData) count); - sprintf(numbuf, "#%d", count); + sprintf(numbuf, "#%ld", count); Tcl_AppendToObj(nameObj, numbuf, -1); entry = Tcl_CreateHashEntry(&names, Tcl_GetString(nameObj), &new); @@ -2968,7 +2970,7 @@ int objc, /* Parameter count */ Tcl_Obj *const objv[] /* Parameter vector */ ) { - int lists = (int) clientData; + TDBC_INTPTR_T lists = (TDBC_INTPTR_T) clientData; Tcl_Object thisObject = Tcl_ObjectContextObject(context); /* The current result set object */ @@ -3244,7 +3246,7 @@ int new; Tcl_HashEntry* entry = Tcl_CreateHashEntry(&(pidata->typeNumHash), - (const char*) (int) (dataTypes[i].oid), + (const char*) (TDBC_INTPTR_T) (dataTypes[i].oid), &new); Tcl_Obj* nameObj = Tcl_NewStringObj(dataTypes[i].name, -1); Tcl_IncrRefCount(nameObj); debian/source/0000755000000000000000000000000012206211361010460 5ustar debian/source/format0000644000000000000000000000001512206211361011667 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212206211361010356 0ustar 8 debian/changelog0000644000000000000000000000024012206211361011026 0ustar tdbcpostgres (1.0.0-1) unstable; urgency=low * Initial release. (Closes: #720518) -- Massimo Manghi Wed, 22 Aug 2013 12:24:05 +0200 debian/watch0000644000000000000000000000007212206211361010210 0ustar version=3 http://sf.net/tcl/tdbcpostgres([\d.]+)\.tar\.gz debian/rules0000755000000000000000000000261412206211361010243 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 #export DH_OPTIONS=-v DIR = $(shell pwd)/debian/tcl8.6-tdbc-postgres %: dh $@ override_dh_auto_configure: CFLAGS="-I/usr/include/tcl8.6" \ dh_auto_configure -- --with-tcl=/usr/lib/tcl8.6/ \ --prefix=/usr \ --includedir=/usr/include \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ --libdir=/usr/lib/tcltk/ \ --libexecdir=/usr/lib/tcltk \ --with-tdbc=$(shell ls -d /usr/lib/tcltk/tdbc*) # running twice cleanup of empty directories as there are two of them nested override_dh_auto_install: dh_auto_install ; \ find $(DIR) -empty -prune -exec rmdir \{\} \; ; \ find $(DIR) -empty -prune -exec rmdir \{\} \; ; debian/control0000644000000000000000000000121012206211361010555 0ustar Source: tdbcpostgres Section: libs Priority: optional Maintainer: Massimo Manghi Build-Depends: debhelper (>=9), tcl8.6-dev, tcl8.6-tdbc (>=1.0.0), postgresql-client Standards-Version: 3.9.4 Homepage: http://tdbc.tcl.tk/ Package: tcl8.6-tdbc-postgres Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, tcl8.6, tcl8.6-tdbc (>=1.0.0), postgresql-client Description: Tcl Database Connectivity Tdbc is an interface standard for SQL databases and connectivity that aims to make it easy to write portable and secure Tcl scripts that access SQL databases. This package provides the driver for the Postgresql DBMS. debian/docs0000644000000000000000000000000712206211361010030 0ustar README