debian/0000755000000000000000000000000012262063357007174 5ustar debian/libmcpp0.install0000644000000000000000000000002512166662104012265 0ustar /usr/lib/*/lib*.so.* debian/mcpp-doc.install0000644000000000000000000000003312166664463012272 0ustar /usr/share/doc/mcpp/*.html debian/docs0000644000000000000000000000001412166660655010051 0ustar README NEWS debian/libmcpp-dev.install0000644000000000000000000000006612166662074012774 0ustar /usr/include/*.h /usr/lib/*/lib*.a /usr/lib/*/lib*.so debian/copyright0000644000000000000000000000613012166660655011136 0ustar This package was debianized by Kiyoshi Matsui on Mon, 24 Mar 2008 00:49:32 +0900 It was downloaded from Copyright Holder: Kiyoshi Matsui License: (Taken from mcpp-2.7/LICENSE) /*- * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui * All rights reserved. * * This software including the files in this directory is provided under * the following license. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ZeroC patch license: /*- * Copyright (c) 2010 ZeroC, Inc. * All rights reserved. * * This software including the files in this directory is provided under * the following license. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ debian/mcpp.install0000644000000000000000000000003412166662142011520 0ustar /usr/bin/* /usr/share/man/* debian/changelog0000644000000000000000000001074512262063354011052 0ustar mcpp (2.7.2-3ubuntu1) trusty; urgency=medium * Build using dh-autoreconf. -- Matthias Klose Sat, 04 Jan 2014 20:54:02 +0100 mcpp (2.7.2-3) unstable; urgency=low * debian/control (Build-Depends): Require autotools-dev. -- NIIBE Yutaka Tue, 09 Jul 2013 04:16:01 +0000 mcpp (2.7.2-2) unstable; urgency=low * debian/control (DM-Upload-Allowed): Remove. (Build-Depends): Require debhelper >= 9. (Standards-Version): Conforms to 3.9.4. [libmcpp0] (Multi-Arch, Pre-Depends): Add. (Homepage): New. (Description): Fix (Closes: #703462). Thanks to Erik Esterer. * debian/compat: Require 9. * debian/source/format: New. * Incorporate NMU (Closes: #611749). Thanks to Cleto Martin Angelina. * debian/patches/01-zeroc-fixes.patch: New. * debian/mcpp-doc.install: New. * debian/{libmcpp0.install,libmcpp-dev.install}: Update for Multi-arch support. Remove *.la. * debian/patches/02-gniibe-fixes.patch: New. Thanks to Alexandre Rebert for finding this bug. -- NIIBE Yutaka Tue, 09 Jul 2013 01:06:21 +0000 mcpp (2.7.2-1.1) unstable; urgency=low * Non-maintainer upload. -- Cleto Martin Angelina Tue, 01 Feb 2011 12:38:46 +0100 mcpp (2.7.2-1) unstable; urgency=low * New upstream release. -- Kiyoshi Matsui Wed, 10 Feb 2010 10:15:10 +0900 mcpp (2.7.1) unstable; urgency=low * New upstream release. -- Kiyoshi Matsui Sat, 24 May 2008 18:40:22 +0900 mcpp (2.7-3) unstable; urgency=low * Provide mcpp-doc package as well. Thanks to 2.6.4-2ubuntu1 package. -- Kiyoshi Matsui Mon, 07 Apr 2008 18:08:47 +0900 mcpp (2.7-2) unstable; urgency=low * debian/control, debian/rules: Provide packages libmcpp0 and libmcpp0-dev as well as mcpp (Closes: #474169). Thanks to Francisco Moya. * debian/copyright: Updated. NIIBE Yutaka: * src/Makefile.am: Build mcpp with libmcpp. * src/main_libmcpp.c: New file. * Makefile.am: Install mcpp.1 even if MCPP_LIB is defined. * debian/libmcpp-dev.{dirs,install}, debian/libmcpp0.{dirs,install}, debian/mcpp.install: New files. * debian/rules: Enable dh_install and dh_makeshlibs. Supply ac_cv_func_stpcpy=no to configure option to avoid GCC bug. -- Kiyoshi Matsui Sat, 05 Apr 2008 23:21:59 +0900 mcpp (2.7-1) unstable; urgency=low * New upstream release. -- NIIBE Yutaka Fri, 28 Mar 2008 11:07:36 +0900 mcpp (2.6.4-2) unstable; urgency=low * Applied a patch of 1796222 at sf.net. * debian/control (Standards-Version): It now follows 3.7.3. * debian/rules (clean): Fix distclean. (install): Remove empty /usr/lib. -- NIIBE Yutaka Fri, 25 Jan 2008 09:35:00 +0900 mcpp (2.6.4-1) unstable; urgency=low * New upstream release. -- Kiyoshi Matsui Sun, 20 May 2007 22:55:19 +0900 mcpp (2.6.3-1) unstable; urgency=low * Initial Release by the author of mcpp. -- Kiyoshi Matsui Sat, 07 Apr 2007 14:27:29 +0900 mcpp (2.6.2-1) unstable; urgency=low * New upstream release. -- NIIBE Yutaka Mon, 13 Nov 2006 16:31:58 +0900 mcpp (2.6.1-2) unstable; urgency=low * configure.ac: Revert the change for automake 1.9 to minimize diff. (The fix has been reported to upstream and it will be included in forthcoming next release.) -- NIIBE Yutaka Sat, 21 Oct 2006 14:38:24 +0900 mcpp (2.6.1-1) unstable; urgency=low * configure.ac: Fix for automake 1.9. * debian/rules: Install the manual. * debian/control (Standards-Version): Follows new standard 3.7.2.2. * debian/watch: The upstram has been moved. * New upstream release -- NIIBE Yutaka Sat, 14 Oct 2006 15:25:32 +0900 mcpp (2.5-1) unstable; urgency=low * New upstream release -- NIIBE Yutaka Sat, 16 Apr 2005 15:58:16 +0900 mcpp (2.4.1-3) unstable; urgency=low * debian/control: Improve Description. * debian/watch: Prepend opts=pasv before URL. -- NIIBE Yutaka Sat, 23 Oct 2004 23:18:57 +0900 mcpp (2.4.1-2) unstable; urgency=low * src/mcpp.1: Fix formatting. -- NIIBE Yutaka Mon, 9 Aug 2004 17:21:10 +0900 mcpp (2.4.1-1) unstable; urgency=low * Initial Release. config/config.guess, config/config.sub: Import up-to-date version. src/mcpp.1: Added. closes: Bug#239704 -- NIIBE Yutaka Mon, 2 Aug 2004 22:04:32 +0900 debian/compat0000644000000000000000000000000212166661323010372 0ustar 9 debian/libmcpp0.dirs0000644000000000000000000000001012166660655011563 0ustar usr/lib debian/libmcpp-dev.dirs0000644000000000000000000000002412166660655012264 0ustar usr/lib usr/include debian/patches/0000755000000000000000000000000012166677054010633 5ustar debian/patches/02-gniibe-fixes.patch0000644000000000000000000000201712166677012014436 0ustar Description: Simple fixes * Fix freeing unmalloced memory The memory of 'in_file' is not malloced, but points to argv[]. It is wrong to free it. * When there is no input file specified by argv, it causes error and fp_in == NULL. Check is needed to call fclose for fp_in. Author: NIIBE Yutaka ## Fixes the issue reported at: ## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3fa2d89ec00/ Index: mcpp-2.7.2/src/main.c =================================================================== --- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000 +++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000 @@ -428,16 +428,11 @@ fatal_error_exit: #if MCPP_LIB - /* Free malloced memory */ - if (mcpp_debug & MACRO_CALL) { - if (in_file != stdin_name) - free( in_file); - } clear_filelist(); clear_symtable(); #endif - if (fp_in != stdin) + if (fp_in && fp_in != stdin) fclose( fp_in); if (fp_out != stdout) fclose( fp_out); debian/patches/01-zeroc-fixes.patch0000644000000000000000000000444612166663251014332 0ustar Description: Fixes by ZeroC, Inc. Author: ZeroC, Inc. Bug-Debian: http://bugs.debian.org/611749 --- mcpp-2.7.2.orig/src/main.c +++ mcpp-2.7.2/src/main.c @@ -326,6 +326,8 @@ static void init_main( void) = FALSE; option_flags.trig = TRIGRAPHS_INIT; option_flags.dig = DIGRAPHS_INIT; + sh_file = NULL; + sh_line = 0; } int mcpp_lib_main --- mcpp-2.7.2.orig/src/support.c +++ mcpp-2.7.2/src/support.c @@ -188,7 +188,7 @@ static char * append_to_buffer( size_t length ) { - if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ + if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ size_t size = MAX( BUF_INCR_SIZE, length); if (mem_buf_p->buffer == NULL) { /* 1st append */ @@ -1722,6 +1722,8 @@ com_start: sp -= 2; while (*sp != '\n') /* Until end of line */ mcpp_fputc( *sp++, OUT); + mcpp_fputc( '\n', OUT); + wrong_line = TRUE; } goto end_line; default: /* Not a comment */ --- mcpp-2.7.2.orig/src/internal.H +++ mcpp-2.7.2/src/internal.H @@ -390,6 +390,8 @@ extern char * const work_end; /* E extern char identifier[]; /* Lastly scanned name */ extern IFINFO ifstack[]; /* Information of #if nesting */ extern char work_buf[]; +extern FILEINFO * sh_file; +extern int sh_line; /* Temporary buffer for directive line and macro expansion */ /* main.c */ @@ -557,6 +559,6 @@ extern void init_system( void); #endif #endif -#if HOST_HAVE_STPCPY +#if HOST_HAVE_STPCPY && !defined(stpcpy) extern char * stpcpy( char * dest, const char * src); #endif --- mcpp-2.7.2.orig/src/system.c +++ mcpp-2.7.2/src/system.c @@ -3858,6 +3858,9 @@ static int chk_dirp( } #endif +FILEINFO* sh_file; +int sh_line; + void sharp( FILEINFO * sharp_file, int flag /* Flag to append to the line for GCC */ @@ -3868,8 +3871,6 @@ void sharp( * else (i.e. 'sharp_file' is NULL) 'infile'. */ { - static FILEINFO * sh_file; - static int sh_line; FILEINFO * file; int line; debian/patches/series0000644000000000000000000000005312166676240012042 0ustar 01-zeroc-fixes.patch 02-gniibe-fixes.patch debian/README.Debian0000644000000000000000000000034712166660655011250 0ustar mcpp for Debian --------------- This is a package made by the author of mcpp himself, referring to the forerunning Debian's package made by NIIBE Yutaka. -- Kiyoshi Matsui , Sat, 07 Apr 2007 14:27:29 +0900 debian/control0000644000000000000000000000333212262063327010575 0ustar Source: mcpp Section: devel Priority: optional Maintainer: Kiyoshi Matsui Uploaders: NIIBE Yutaka Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf Standards-Version: 3.9.4 Homepage: http://mcpp.sourceforge.net/ Package: mcpp Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Suggests: mcpp-doc Description: Alternative C/C++ preprocessor C/C++ preprocessor defines and expands macros and processes '#if', '#include' and some other directives. . mcpp is an alternative C/C++ preprocessor with the highest conformance. It supports multiple standards: K&R, ISO C90, ISO C99, and ISO C++98. mcpp is especially useful for debugging a source program which uses complicated macros and also useful for checking portability of a source. . Though mcpp could be built as a replacement of GCC's resident preprocessor or as a stand-alone program without using library build of mcpp, this package installs only a program named 'mcpp' which links shared library of mcpp and behaves independent from GCC. Package: libmcpp0 Section: libs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Description: Alternative C/C++ preprocessor (shared library) This package installs the shared library version of mcpp. Package: libmcpp-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libmcpp0 (= ${binary:Version}) Description: Alternative C/C++ preprocessor (development files) This package installs the development files for the library version of mcpp. Package: mcpp-doc Architecture: all Section: doc Depends: ${misc:Depends} Description: Alternative C/C++ preprocessor (manual) This package contains the manual. debian/dirs0000644000000000000000000000001012166660655010056 0ustar usr/bin debian/rules0000755000000000000000000000063112262063314010245 0ustar #!/usr/bin/make -f # -*- makefile-gmake -*- %: dh $@ --with autoreconf override_dh_auto_clean: dh_auto_clean rm -f config/config.sub config/config.guess override_dh_auto_configure: ln -sf /usr/share/misc/config.sub config/ ln -sf /usr/share/misc/config.guess config/ dh_auto_configure -- --enable-mcpplib override_dh_auto_build: dh_auto_build rm -f $(CURDIR)/debian/tmp/usr/share/doc/mcpp/LICENSE debian/source/0000755000000000000000000000000012166660761010501 5ustar debian/source/format0000644000000000000000000000001412166660761011707 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000006012166660655010230 0ustar version=3 http://sf.net/mcpp/mcpp-(.*)\.tar\.gz