debian/0000755000000000000000000000000012205637773007202 5ustar debian/copyright0000644000000000000000000002054112205637773011137 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/watch0000644000000000000000000000006712205637773010236 0ustar version=3 http://sf.net/tcl/tdbcmysql([\d.]+)\.tar\.gz debian/changelog0000644000000000000000000000023512205637773011054 0ustar tdbcmysql (1.0.0-1) unstable; urgency=low * Initial release. (Closes: #720410) -- Massimo Manghi Wed, 21 Aug 2013 16:20:55 +0200 debian/docs0000644000000000000000000000000712205637773010052 0ustar README debian/patches/0000755000000000000000000000000012205637773010631 5ustar debian/patches/series0000644000000000000000000000004312205637773012043 0ustar tdbc_mysql.n.patch tdbcmysql.patch debian/patches/tdbcmysql.patch0000644000000000000000000000631212205637773013656 0ustar Description: potentially unsafe pointer to int assignments pointer values are repeatedly assigned to int variables causing a potential loss of information and making GCC complain about it. We coped with the problem using intptr_t which is guaranteed to be the same size of a pointer (defined in ). We check for HAVE_STDINT_H to define a TDBC_INTPTR_T data type and in case the test fails we revert to the original int definition Author: Massimo Manghi Bug: http://core.tcl.tk/tdbcmysql/tktview?name=60999d7b92 Last-Update: 2013-08-21 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/generic/tdbcmysql.c +++ b/generic/tdbcmysql.c @@ -22,10 +22,23 @@ #include #include +#ifdef HAVE_STDINT_H +#include +#endif + #include #include "fakemysql.h" + +/* let's define the type for the integer of the same size of a pointer */ + +#ifdef HAVE_STDINT_H +typedef intptr_t TDBC_INTPTR_T; +#else +typedef int TDBC_INTPTR_T; +#endif + /* Static data contained in this file */ TCL_DECLARE_MUTEX(mysqlMutex); /* Mutex protecting the global environment @@ -182,7 +195,7 @@ typedef struct ParamData { int flags; /* Flags regarding the parameters - see below */ - int dataType; /* Data type */ + TDBC_INTPTR_T dataType; /* Data type */ int precision; /* Size of the expected data */ int scale; /* Digits after decimal point of the * expected data */ @@ -233,7 +246,7 @@ #define IS_BINARY (1<<16) /* Flag to OR in if a param is binary */ typedef struct MysqlDataType { const char* name; /* Type name */ - int num; /* Type number */ + TDBC_INTPTR_T num; /* Type number */ } MysqlDataType; static const MysqlDataType dataTypes[] = { { "tinyint", MYSQL_TYPE_TINY }, @@ -2317,7 +2330,7 @@ Tcl_Obj* nameObj; /* Name of a result column */ int new; /* Flag == 1 if a result column is unique */ Tcl_HashEntry* entry; /* Hash table entry for a column name */ - int count; /* Number used to disambiguate a column name */ + TDBC_INTPTR_T count; /* Number used to disambiguate a column name */ Tcl_InitHashTable(&names, TCL_STRING_KEYS); if (result != NULL) { @@ -2332,10 +2345,10 @@ entry = Tcl_CreateHashEntry(&names, field->name, &new); count = 1; 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); @@ -3239,7 +3252,7 @@ Tcl_Obj *const objv[] /* Parameter vector */ ) { - int lists = (int) clientData; + TDBC_INTPTR_T lists = (TDBC_INTPTR_T) clientData; /* Flag == 1 if lists are to be returned, * 0 if dicts are to be returned */ @@ -3584,7 +3597,7 @@ int new; Tcl_HashEntry* entry = Tcl_CreateHashEntry(&(pidata->typeNumHash), - (const char*) (int) (dataTypes[i].num), + (const char*) (dataTypes[i].num), &new); Tcl_Obj* nameObj = Tcl_NewStringObj(dataTypes[i].name, -1); Tcl_IncrRefCount(nameObj); debian/patches/tdbc_mysql.n.patch0000644000000000000000000000274112205637773014253 0ustar Description: list macro .IP confused by missing argument delimiters Author: Massimo Manghi Last-Update: 2013-08-21 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/doc/tdbc_mysql.n +++ b/doc/tdbc_mysql.n @@ -129,11 +129,11 @@ is meaningful only on initial connection. When using the \fBconfigure\fR method on a MySQL connection use the \fB-timeout\fR option to set the timeout desired. -.IP \fB-ssl_ca\fR \fIstring\fR -.IP \fB-ssl_capath\fR \fIstring\fR -.IP \fB-ssl_cert\fR \fIstring\fR -.IP \fB-ssl_cipher\fR \fIstring\fR -.IP \fB-ssl_key\fR \fIstring\fR +.IP "\fB-ssl_ca\fR \fIstring\fR" +.IP "\fB-ssl_capath\fR \fIstring\fR" +.IP "\fB-ssl_cert\fR \fIstring\fR" +.IP "\fB-ssl_cipher\fR \fIstring\fR" +.IP "\fB-ssl_key\fR \fIstring\fR" These five options set the certificate authority, certificate authority search path, SSL certificate, transfer cipher, and SSL key to the given \fIstring\fR arguments. These options may be specified only @@ -150,7 +150,7 @@ .SH "ADDITIONAL CONNECTION METHODS" In addition to the usual methods on the tdbc::connection(n) object, connections to a MySQL database support one additional method: -.IP \fI$connection\fR \fBevaldirect\fR \fIsqlStatement\fR +.IP "\fI$connection\fR \fBevaldirect\fR \fIsqlStatement\fR" This method takes the given \fIsqlStatement\fR and interprets as MySQL native SQL code and evaluates it without preparing it. The statement may not contain variable substitutions. The result set debian/rules0000755000000000000000000000373512205637773010272 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-mysql %: dh $@ override_dh_auto_install: dh_auto_install mkdir $(DIR)/usr/share/man/man3 # Fix up the manpages. cd $(DIR)/usr/share/man/mann && \ for f in *.[3n] ; do \ f2=$$(echo $$f | sed -e 's/\.[3n]/.3tcl/') ; \ if [ -L $$f ]; then \ l=$$(readlink -n $$f | sed -e 's/\.[3n]/.3tcl/') ; \ rm $$f ; \ ln -sf $$l $$f2 ; \ else \ cat $$f | sed -e 's/^\.TH \([^ ]\+\|"[^"]\+"\) [3n]/.TH \1 3tcl/' \ -e 's/\(Tk_[0-9A-Za-z]*\)(3)/\1(3tk)/g' \ -e 's/\([A-Z][0-9A-Za-z_]*\)(3)/\1(3tcl)/g' \ -e 's/send(n)/send(3tk)/g' \ -e 's/text(n)/text(3tk)/g' \ -e 's/tk(n)/tk(3tk)/g' \ -e 's/winfo(n)/winfo(3tk)/g' \ -e 's/(n)/(3tcl)/g' \ -e "s/\\N'244'/\\[^o]/g" \ >$$f2 ; \ rm $$f ; \ mv -v $$f2 ../man3/ ; \ fi ; \ done ; \ find $(DIR) -empty -prune -exec rmdir \{\} \; ; 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*) debian/compat0000644000000000000000000000000212205637773010400 0ustar 8 debian/source/0000755000000000000000000000000012205637773010502 5ustar debian/source/format0000644000000000000000000000001512205637773011711 0ustar 3.0 (quilt) debian/control0000644000000000000000000000116112205637773010604 0ustar Source: tdbcmysql Section: libs Priority: optional Maintainer: Massimo Manghi Build-Depends: debhelper (>=9), tcl8.6-dev, tcl8.6-tdbc, libmysqlclient18 Standards-Version: 3.9.4 Homepage: http://tdbc.tcl.tk/ Package: tcl8.6-tdbc-mysql Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, tcl8.6, tcl8.6-tdbc (>=1.0.0), libmysqlclient18 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 Mysql DBMS.