Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mcpp for openSUSE:Factory checked in at 2024-05-15 21:29:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mcpp (Old) and /work/SRC/openSUSE:Factory/.mcpp.new.1880 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mcpp" Wed May 15 21:29:05 2024 rev:18 rq:1174214 version:2.7.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/mcpp/mcpp.changes 2020-03-19 19:54:00.552277066 +0100 +++ /work/SRC/openSUSE:Factory/.mcpp.new.1880/mcpp.changes 2024-05-15 21:29:29.131865666 +0200 @@ -1,0 +2,8 @@ +Sun Dec 31 09:45:08 UTC 2023 - Dirk Müller <[email protected]> + +- update to 2.7.2.1: + * include patches from homebrew +- Rebase and rename mcpp-2.7.2.diff to mcpp-2.7.2.1.diff +- drop CVE-2019-14274.patch (included already) + +------------------------------------------------------------------- Old: ---- CVE-2019-14274.patch mcpp-2.7.2.diff mcpp-2.7.2.tar.gz New: ---- 2.7.2.1.tar.gz mcpp-2.7.2.1.diff BETA DEBUG BEGIN: Old:- Rebase and rename mcpp-2.7.2.diff to mcpp-2.7.2.1.diff - drop CVE-2019-14274.patch (included already) Old: * include patches from homebrew - Rebase and rename mcpp-2.7.2.diff to mcpp-2.7.2.1.diff - drop CVE-2019-14274.patch (included already) BETA DEBUG END: BETA DEBUG BEGIN: New: * include patches from homebrew - Rebase and rename mcpp-2.7.2.diff to mcpp-2.7.2.1.diff - drop CVE-2019-14274.patch (included already) BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mcpp.spec ++++++ --- /var/tmp/diff_new_pack.bq9UMc/_old 2024-05-15 21:29:29.667885067 +0200 +++ /var/tmp/diff_new_pack.bq9UMc/_new 2024-05-15 21:29:29.667885067 +0200 @@ -1,7 +1,7 @@ # # spec file for package mcpp # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,14 @@ Name: mcpp -Version: 2.7.2 +Version: 2.7.2.1 Release: 0 Summary: Matsui's C Preprocessor License: BSD-3-Clause Group: Development/Languages/C and C++ -URL: http://mcpp.sourceforge.net/ -Source0: http://sourceforge.net/projects/mcpp/files/mcpp/V.%{version}/%{name}-%{version}.tar.gz -Patch0: %{name}-%{version}.diff -Patch1: CVE-2019-14274.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: https://mcpp.sourceforge.net/ +Source0: https://github.com/museoa/mcpp/archive/refs/tags/%{version}.tar.gz +Patch0: %{name}-2.7.2.1.diff %description mcpp is a small and portable C/C++ preprocessor implementing all of @@ -57,36 +55,31 @@ This package holds the development files for libev. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 %build export CFLAGS="%{optflags} -D_BSD_SOURCE" %configure --enable-mcpplib -make %{?_smp_mflags} +%make_build %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install rm -rf %{buildroot}%{_datadir}/doc/mcpp rm -rf %{buildroot}%{_libdir}/libmcpp.*a %post -n %{_libname} -p /sbin/ldconfig - %postun -n %{_libname} -p /sbin/ldconfig %files -%defattr(-, root, root) -%doc doc/mcpp-manual.html LICENSE NEWS README +%license LICENSE +%doc doc/mcpp-manual.html NEWS README %{_bindir}/* -%{_mandir}/man1/mcpp.1.gz +%{_mandir}/man1/mcpp.1%{?ext_man} %files -n %{_libname} -%defattr(-,root,root,-) -%{_libdir}/libmcpp.so.* +%{_libdir}/libmcpp.so.0* %files devel -%defattr(-,root,root,-) %{_includedir}/mcpp_*.h %{_libdir}/libmcpp.so ++++++ mcpp-2.7.2.tar.gz -> 2.7.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/config/config.guess new/mcpp-2.7.2.1/config/config.guess --- old/mcpp-2.7.2/config/config.guess 2006-08-10 17:17:12.000000000 +0200 +++ new/mcpp-2.7.2.1/config/config.guess 2022-09-01 07:33:05.000000000 +0200 @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2005-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -107,7 +106,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -207,11 +206,8 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -768,14 +764,7 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -790,11 +779,8 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -831,9 +817,6 @@ arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -868,11 +851,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -891,11 +870,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -992,7 +967,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout @@ -1002,11 +977,7 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/config/config.sub new/mcpp-2.7.2.1/config/config.sub --- old/mcpp-2.7.2/config/config.sub 2006-08-10 17:17:12.000000000 +0200 +++ new/mcpp-2.7.2.1/config/config.sub 2022-09-01 07:33:05.000000000 +0200 @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2005-12-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -241,7 +240,7 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -249,8 +248,7 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -270,17 +268,16 @@ | mn10200 | mn10300 \ | mt \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ @@ -288,6 +285,9 @@ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -317,7 +317,7 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ @@ -328,7 +328,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -350,18 +350,17 @@ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ @@ -372,6 +371,8 @@ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -817,12 +818,6 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -1125,7 +1120,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1198,8 +1193,7 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1214,7 +1208,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1366,9 +1360,6 @@ # system, and we'll never get to this point. case $basic_machine in - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1378,9 +1369,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/config/ltmain.sh new/mcpp-2.7.2.1/config/ltmain.sh --- old/mcpp-2.7.2/config/ltmain.sh 2006-03-11 19:49:04.000000000 +0100 +++ new/mcpp-2.7.2.1/config/ltmain.sh 2022-09-01 07:33:05.000000000 +0200 @@ -43,7 +43,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="1.5.22 Debian 1.5.22-4" +VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # See if we are running on zsh, and set the options which allow our @@ -2082,10 +2082,7 @@ case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then @@ -3204,11 +3201,6 @@ age="$number_minor" revision="$number_minor" ;; - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; esac ;; no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/src/internal.H new/mcpp-2.7.2.1/src/internal.H --- old/mcpp-2.7.2/src/internal.H 2008-08-27 15:01:16.000000000 +0200 +++ new/mcpp-2.7.2.1/src/internal.H 2022-09-01 07:33:05.000000000 +0200 @@ -390,6 +390,8 @@ 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 @@ #endif #endif -#if HOST_HAVE_STPCPY +#if HOST_HAVE_STPCPY && !defined(stpcpy) extern char * stpcpy( char * dest, const char * src); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/src/main.c new/mcpp-2.7.2.1/src/main.c --- old/mcpp-2.7.2/src/main.c 2008-11-05 09:34:46.000000000 +0100 +++ new/mcpp-2.7.2.1/src/main.c 2022-09-01 07:33:05.000000000 +0200 @@ -326,6 +326,8 @@ = FALSE; option_flags.trig = TRIGRAPHS_INIT; option_flags.dig = DIGRAPHS_INIT; + sh_file = NULL; + sh_line = 0; } int mcpp_lib_main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/src/support.c new/mcpp-2.7.2.1/src/support.c --- old/mcpp-2.7.2/src/support.c 2008-06-10 10:32:33.000000000 +0200 +++ new/mcpp-2.7.2.1/src/support.c 2022-09-01 07:33:05.000000000 +0200 @@ -188,7 +188,7 @@ 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 @@ 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 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/src/system.c new/mcpp-2.7.2.1/src/system.c --- old/mcpp-2.7.2/src/system.c 2008-11-26 10:53:51.000000000 +0100 +++ new/mcpp-2.7.2.1/src/system.c 2022-09-01 07:33:05.000000000 +0200 @@ -3534,6 +3534,32 @@ FILEINFO * file; const char * too_many_include_nest = "More than %.0s%ld nesting of #include"; /* _F_ _W4_ */ + + // + // When encoding is UTF-8, skip BOM if present. + // + if(mbchar == UTF8 && fp != NULL && ftell(fp) == 0) + { + const unsigned char UTF8_BOM[3] = {0xEF, 0xBB, 0xBF}; + unsigned char FILE_HEAD[3] = {0, 0, 0}; + int i; + for(i = 0; i < 3; ++i) + { + FILE_HEAD[i] = getc(fp); + if(FILE_HEAD[i] != UTF8_BOM[i]) + { + if(FILE_HEAD[i] == (unsigned char)EOF) + { + i--; + } + for(; i >= 0; --i) + { + ungetc(FILE_HEAD[i], fp); + } + break; + } + } + } filename = set_fname( filename); /* Search or append to fnamelist[] */ fullname = set_fname( fullname); /* Search or append to fnamelist[] */ @@ -3858,6 +3884,9 @@ } #endif +FILEINFO* sh_file; +int sh_line; + void sharp( FILEINFO * sharp_file, int flag /* Flag to append to the line for GCC */ @@ -3868,8 +3897,6 @@ * else (i.e. 'sharp_file' is NULL) 'infile'. */ { - static FILEINFO * sh_file; - static int sh_line; FILEINFO * file; int line; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcpp-2.7.2/test-c/u_1_23.c new/mcpp-2.7.2.1/test-c/u_1_23.c --- old/mcpp-2.7.2/test-c/u_1_23.c 2006-10-22 07:46:35.000000000 +0200 +++ new/mcpp-2.7.2.1/test-c/u_1_23.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -/* u_1_23.c: Undefined behaviors on generating invalid pp-token by # - operator. */ - -#include <stdio.h> -#define str( a) # a - -main( void) -{ - -/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be - diagnosed by compiler-proper unless diagnosed by preprocessor. */ - puts( str( \"")); - - return 0; -} - ++++++ mcpp-2.7.2.diff -> mcpp-2.7.2.1.diff ++++++
