--- jlint-3.0.orig/functions.hh +++ jlint-3.0/functions.hh @@ -38,6 +38,10 @@ #ifdef __alpha__ #define __VALIST va_list #endif +// so does GNUC +#ifdef __GNUC__ +#define __VALIST va_list +#endif // so does GNUC #ifdef __GNUC__ --- jlint-3.0.orig/string_pool.hh +++ jlint-3.0/string_pool.hh @@ -1,6 +1,9 @@ #ifndef STRING_POOL_HH #define STRING_POOL_HH +#include +#include + #ifdef __GNUC__ #if __GNUC__ > 2 using namespace std; --- jlint-3.0.orig/jlint.cc +++ jlint-3.0/jlint.cc @@ -137,7 +137,7 @@ void format_message(int code, utf_string const& file, int line, __VALIST ap) { - static int loop_id; + static long loop_id; static message_node *first, *last; static char* compound_message; const void* parameter[MAX_MSG_PARAMETERS]; @@ -150,7 +150,7 @@ if (compound_message != NULL && ((loop_id != 0 && ((code != msg_loop && code != msg_sync_loop) - || (int)parameter[2] != loop_id)) + || (long)parameter[2] != loop_id)) || (loop_id == 0 && code != msg_wait_path))) { if (!message_node::find(compound_message)) { @@ -225,7 +225,7 @@ name.as_asciz()); break; case 'd': // integer - dst += sprintf(dst, "%d", (int)parameter[index]); + dst += sprintf(dst, "%ld", (long)parameter[index]); break; default: assert(false/*bad message parameter format*/); @@ -261,7 +261,7 @@ compound_message = strdup(his_buf); first = last = new message_node(msg_buf); if (code != msg_wait) { - loop_id = (int)parameter[2]; + loop_id = (long)parameter[2]; } } else if (!message_node::find(his_buf)) { fprintf(stdout, "%s\n", msg_buf); --- jlint-3.0.orig/inlines.hh +++ jlint-3.0/inlines.hh @@ -5,6 +5,10 @@ #include +#include + +#include + inline int unpack2(byte* s) { return (s[0] << 8) + s[1]; } --- jlint-3.0.orig/field_desc.hh +++ jlint-3.0/field_desc.hh @@ -6,6 +6,10 @@ #pragma warning (disable : 4786) #endif +#ifdef __GNUC__ +using namespace std; +#endif + #include "component_desc.hh" #include "utf_string.hh" class const_name_and_type; --- jlint-3.0.orig/Makefile +++ jlint-3.0/Makefile @@ -120,7 +120,7 @@ locks.o \ message_node.o \ method_desc.o - $(CPP) $(LFLAGS) -o jlint access_desc.o callee_desc.o class_desc.o graph.o jlint.o local_context.o locks.o message_node.o method_desc.o + $(CPP) -o jlint access_desc.o callee_desc.o class_desc.o graph.o jlint.o local_context.o locks.o message_node.o method_desc.o $(LFLAGS) access_desc.o: access_desc.cc \ access_desc.hh \ --- jlint-3.0.orig/message_node.hh +++ jlint-3.0/message_node.hh @@ -1,6 +1,6 @@ #ifndef MESSAGE_NODE_HH #define MESSAGE_NODE_HH -//#include +#include //#include "types.hh" // included by functions.hh #include "functions.hh" --- jlint-3.0.orig/method_desc.cc +++ jlint-3.0/method_desc.cc @@ -2714,7 +2714,8 @@ curr_type = curr_cls = cls; caller_method = this; } else { - if (curr->name_and_type->name == 0) { + if (curr->name_and_type == 0 || + curr->name_and_type->name == 0) { curr_cls = cls; } else { curr_cls = curr->cls; --- jlint-3.0.orig/types.hh +++ jlint-3.0/types.hh @@ -31,9 +31,11 @@ #endif #endif +#if 0 #define bool int #define true 1 #define false 0 +#endif #define nobreak --- jlint-3.0.orig/debian/prerm +++ jlint-3.0/debian/prerm @@ -0,0 +1,38 @@ +#! /bin/sh +# prerm script for jlint +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- jlint-3.0.orig/debian/jlint-doc.docbase +++ jlint-3.0/debian/jlint-doc.docbase @@ -0,0 +1,11 @@ +Document: jlint +Title: Debian jlint Manual +Author: Konstantin Knizhnik, Cyrille Artho +Abstract: Manual for jlint, a Java Program Checker +Section: devel + +Format: PDF +Files: /usr/share/doc/jlint-doc/manual.pdf.gz + +Format: HTML +Index: /usr/share/doc/jlint-doc/manual.html --- jlint-3.0.orig/debian/copyright +++ jlint-3.0/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Ganesan R on +Tue, 30 Jul 2002 14:12:28 +0530. + +It was downloaded from http://sourceforge.net/project/showfiles.php?group_id=66529 + +Upstream Authors: Konstantin Knizhnik (knizhnik@garret.ru) and + Cyrille Artho (cyrille@artho.com) + +Copyright: + +This program is free software; you may 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, or (at your option) +any later version. + +This 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. + +A copy of the GNU General Public License is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution +or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- jlint-3.0.orig/debian/changelog +++ jlint-3.0/debian/changelog @@ -0,0 +1,133 @@ +jlint (3.0-4.5ubuntu1) raring; urgency=low + + * Merge from Debian unstable (LP: #1074409). Remaining changes: + - debian/control: Add ${misc:Depends} to jlint binary depends. + - Makefile: Adjust placement of linked libs. Fixes FTBFS. + * Dropped changes: + - Fix makefile target dependencies (done in Debian). + + -- Logan Rosen Fri, 02 Nov 2012 12:36:22 -0400 + +jlint (3.0-4.5) unstable; urgency=low + + * Non-maintainer upload. + * Fix makefile target dependencies (Closes: #666280). + + -- Luk Claes Fri, 06 Jul 2012 02:53:01 +0000 + +jlint (3.0-4.4ubuntu2) quantal; urgency=low + + * debian/rules: move the patch target as a dependency from the "build" + target to "build-arch" and "build-indep" to get the patches also applied + when only the "build-arch" target is called by the buildd. + + -- Michael Bienia Sun, 30 Sep 2012 12:52:54 +0200 + +jlint (3.0-4.4ubuntu1) oneiric; urgency=low + + * Makefile: Adjust placement of linked libs. Fixes FTBFS. + (LP: #770781) + + -- Daniel T Chen Tue, 13 Sep 2011 16:48:23 -0400 + +jlint (3.0-4.4) unstable; urgency=low + + * Non-maintainer upload. + * Fix "FTBFS: cp: cannot stat `manual.pdf': No such file or directory" + Applied patch by Nobuhiro Iwamatsu (Closes: #565961) + + -- Bastian Venthur Tue, 23 Feb 2010 17:05:14 +0100 + +jlint (3.0-4.3) unstable; urgency=low + + [Jari Aalto] + * Non-maintainer upload. + * debian/clean + - New file. Clean traces of build. + * debian/compat + - New file. Set to 7. + * debian/control + - (Build-Depends): Change obsolete tetex-extra to texlive (E: lintian). + Add quilt for patches. Update debhelper from not supported 3 to 7. + * debian/patches + - (number 10): New patch to fix gcc 4.4 + error: invalid conversion from const char* to char*. + (FTBFS RC bug serious; Closes: #560473). + * debian/rules + - Add quilt for patch management. + - (top level): Remove non-supported level DH_COMPAT=3. + - (binary-indep, binary-indep.stamp): Added workaround to + save and restore manual.pdf to avoid "binary contents + changed" error. The PDF file is during the build. + + -- Jari Aalto Sat, 09 Jan 2010 15:00:59 +0200 + +jlint (3.0-4.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 4.3 (Closes: #417235). + + -- Luk Claes Sun, 09 Mar 2008 15:24:42 +0000 + +jlint (3.0-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Added build-dependency on texinfo, suggested by Matt Kraai. + Closes: #334651. + + -- Lars Wirzenius Sat, 29 Oct 2005 00:31:00 +0300 + +jlint (3.0-4) unstable; urgency=low + + * Fix another "cast from 'const void*' to 'int' loses precision" error. + + -- Ganesan Rajagopal Thu, 8 Sep 2005 10:26:54 +0530 + +jlint (3.0-3) unstable; urgency=low + + * Fix FTBFS on amd64, thanks to Andreas Jochens for patch + (Closes: #326451). + + -- Ganesan Rajagopal Wed, 7 Sep 2005 14:37:09 +0530 + +jlint (3.0-2) unstable; urgency=low + + * Fix FTBFS, add build dependency on zlib1g-dev (Closes: #326451). + + -- Ganesan Rajagopal Mon, 5 Sep 2005 13:23:16 +0530 + +jlint (3.0-1) unstable; urgency=low + + * New upstream release. + * Updated standards version. + * Fix build breakages due to redefinition of bool (Closes: #315604, #320902) + + -- Ganesan Rajagopal Fri, 2 Sep 2005 16:07:49 +0530 + +jlint (2.3-4) unstable; urgency=low + + * Applied patch from Matt Kraai for g++ 3.3 build + problem (Closes: #196530). + * Added a reference to /usr/share/common-licenses/GPL as per policy. + * Bumped up standards version. + + -- Ganesan Rajagopal Thu, 17 Jul 2003 18:55:19 +0530 + +jlint (2.3-3) unstable; urgency=low + + * Added tetex-extra to Build-Depends. pdftex appears to break without it. + + -- Ganesan Rajagopal Mon, 16 Sep 2002 10:55:19 +0530 + +jlint (2.3-2) unstable; urgency=low + + * Fixed various build problems on non-intel archs (Closes: #160119, + #160534). + + -- Ganesan Rajagopal Sat, 14 Sep 2002 10:31:19 +0530 + +jlint (2.3-1) unstable; urgency=low + + * Initial Release. + + -- Ganesan Rajagopal Tue, 28 Aug 2002 18:25:28 +0530 --- jlint-3.0.orig/debian/rules +++ jlint-3.0/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +build-arch: patch build-arch-stamp +build-arch-stamp: + dh_testdir + + # compile/build the package. + $(MAKE) + + touch build-arch-stamp + +build-indep: patch build-indep-stamp +build-indep-stamp: + dh_testdir + + [ ! -f manual.pdf ] || [ -f manual.pdf.original ] || cp -v manual.pdf manual.pdf.original + $(MAKE) doc + touch build-indep-stamp + +build: build-arch build-indep + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-*-stamp configure-stamp + + # clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install INSTALL_DIR=$(CURDIR)/debian/jlint/usr/bin + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: build install + [ ! -f manual.pdf.original ] || mv -v manual.pdf.original manual.pdf + dh_testdir -i + dh_testroot -i + dh_installdocs -i + dh_installinfo -i + dh_installchangelogs CHANGELOG -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installdocs -a +# dh_installman -a + dh_undocumented -a jlint.1 jlint.sh.1 antic.1 + dh_installchangelogs CHANGELOG -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- jlint-3.0.orig/debian/clean +++ jlint-3.0/debian/clean @@ -0,0 +1,11 @@ +manual.aux +manual.cp +manual.fn +manual.html +manual.ky +manual.log +manual.pg +manual.toc +manual.tp +manual.vr +debian/debhelper.log --- jlint-3.0.orig/debian/postinst +++ jlint-3.0/debian/postinst @@ -0,0 +1,48 @@ +#! /bin/sh +# postinst script for jlint +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- jlint-3.0.orig/debian/dirs +++ jlint-3.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin + --- jlint-3.0.orig/debian/control +++ jlint-3.0/debian/control @@ -0,0 +1,24 @@ +Source: jlint +Section: devel +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ganesan Rajagopal +Build-Depends: debhelper (>= 7), texi2html, texlive, zlib1g-dev, texinfo, quilt +Standards-Version: 3.6.2 + +Package: jlint +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A Java Program Checker + Jlint will check your Java code and find bugs, inconsistencies and + synchronization problems by doing data flow analysis and building the lock + graph. + +Package: jlint-doc +Section: doc +Architecture: all +Description: Manual for jlint - a Java Program Checker + Jlint will check your Java code and find bugs, inconsistencies and + synchronization problems by doing data flow analysis and building the lock + graph. This package contains the manual for jlint in info, html and pdf + formats. --- jlint-3.0.orig/debian/postrm +++ jlint-3.0/debian/postrm @@ -0,0 +1,38 @@ +#! /bin/sh +# postrm script for jlint +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- jlint-3.0.orig/debian/compat +++ jlint-3.0/debian/compat @@ -0,0 +1 @@ +7 --- jlint-3.0.orig/debian/jlint-doc.files +++ jlint-3.0/debian/jlint-doc.files @@ -0,0 +1,2 @@ +#DOCS# + --- jlint-3.0.orig/debian/jlint-doc.docs +++ jlint-3.0/debian/jlint-doc.docs @@ -0,0 +1,6 @@ +BUGS +README +TODO +manual.pdf +manual.html + --- jlint-3.0.orig/debian/docs +++ jlint-3.0/debian/docs @@ -0,0 +1,4 @@ +BUGS +README +TODO + --- jlint-3.0.orig/debian/preinst +++ jlint-3.0/debian/preinst @@ -0,0 +1,38 @@ +#! /bin/sh +# preinst script for jlint +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- jlint-3.0.orig/debian/patches/series +++ jlint-3.0/debian/patches/series @@ -0,0 +1 @@ +10-gcc-4.4-const-char.patch --- jlint-3.0.orig/debian/patches/10-gcc-4.4-const-char.patch +++ jlint-3.0/debian/patches/10-gcc-4.4-const-char.patch @@ -0,0 +1,26 @@ +From 5bea07ae23c850818c8339f27f5286bc12dc05bf Mon Sep 17 00:00:00 2001 +From: Jari Aalto +Date: Fri, 8 Jan 2010 14:12:30 +0200 +Subject: [PATCH] Fix Gcc 4.4 error: invalid conversion from const char* to char* + +Signed-off-by: Jari Aalto +--- + jlint.cc | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/jlint.cc b/jlint.cc +index 0da1781..a136592 100644 +--- a/jlint.cc ++++ b/jlint.cc +@@ -296,7 +296,7 @@ void set_class_source_path(class_desc* cls) + if (source_file_path_len != 0) { + const char* class_file_name = cls->source_file.as_asciz(); + if (!source_path_redefined) { +- char* dirend = strrchr(class_file_name, '/'); ++ const char* dirend = strrchr(class_file_name, '/'); + if (dirend != NULL) { + int dirlen = dirend - class_file_name; + if (dirlen <= source_file_path_len +-- +1.6.5 +