ports/155934: Incorporate patch from the Ice project into devel/mcpp
Michael Gmelin
freebsd at grem.de
Fri Mar 25 17:40:09 UTC 2011
The following reply was made to PR ports/155934; it has been noted by GNATS.
From: Michael Gmelin <freebsd at grem.de>
To: bug-followup at FreeBSD.org,
freebsd at grem.de
Cc:
Subject: Re: ports/155934: Incorporate patch from the Ice project into devel/mcpp
Date: Fri, 25 Mar 2011 18:09:00 +0100
--Apple-Mail-69-643193647
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Please find attached a full patch against the ports tree (Makefile with =
PORTREVISION bumped etc.) which should apply cleanly against devel/mcpp, =
so minimal effort required by ports maintainer).
--Apple-Mail-69-643193647
Content-Disposition: attachment;
filename=mcpp.patch.txt
Content-Type: text/plain;
name="mcpp.patch.txt"
Content-Transfer-Encoding: quoted-printable
=3D=3D=3D> Generating patch
=3D=3D=3D> Viewing diff with more
diff -ruN --exclude=3DCVS /usr/ports/devel/mcpp.orig/Makefile =
/usr/ports/devel/mcpp/Makefile
--- /usr/ports/devel/mcpp.orig/Makefile 2011-03-25 17:31:41.000000000 =
+0100
+++ /usr/ports/devel/mcpp/Makefile 2011-03-25 04:31:04.596814000 =
+0100
@@ -7,6 +7,7 @@
=20
PORTNAME=3D mcpp
PORTVERSION=3D 2.7.2
+PORTREVISION=3D 1
CATEGORIES=3D devel
MASTER_SITES=3D SF/${PORTNAME}/${PORTNAME}/V.${PORTVERSION}
=20
diff -ruN --exclude=3DCVS =
/usr/ports/devel/mcpp.orig/files/patch-mcpp-ice =
/usr/ports/devel/mcpp/files/patch-mcpp-ice
--- /usr/ports/devel/mcpp.orig/files/patch-mcpp-ice 1970-01-01 =
01:00:00.000000000 +0100
+++ /usr/ports/devel/mcpp/files/patch-mcpp-ice 2011-03-23 =
07:45:47.000000000 +0100
@@ -0,0 +1,100 @@
+diff -c -r -N ../mcpp-2.7.2/src/internal.H ./src/internal.H
+*** ../mcpp-2.7.2/src/internal.H 2008-08-27 10:31:16.000000000 =
-0230
+--- ./src/internal.H 2009-12-17 21:01:35.000000000 -0330
+***************
+*** 390,395 ****
+--- 390,397 ----
+ 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 =
*/
+ =20
+ /* main.c */
+***************
+*** 557,562 ****
+ #endif
+ #endif
+ =20
+! #if HOST_HAVE_STPCPY
+ extern char * stpcpy( char * dest, const char * src);
+ #endif
+--- 559,564 ----
+ #endif
+ #endif
+ =20
+! #if HOST_HAVE_STPCPY && !defined(stpcpy)
+ extern char * stpcpy( char * dest, const char * src);
+ #endif
+diff -c -r -N ../mcpp-2.7.2/src/main.c ./src/main.c
+*** ../mcpp-2.7.2/src/main.c 2008-11-05 05:04:46.000000000 -0330
+--- ./src/main.c 2009-12-17 20:42:42.000000000 -0330
+***************
+*** 326,331 ****
+--- 326,333 ----
+ =3D FALSE;
+ option_flags.trig =3D TRIGRAPHS_INIT;
+ option_flags.dig =3D DIGRAPHS_INIT;
++ sh_file =3D NULL;
++ sh_line =3D 0;
+ }
+ =20
+ int mcpp_lib_main
+diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
+*** ../mcpp-2.7.2/src/support.c 2008-06-10 06:02:33.000000000 =
-0230
+--- ./src/support.c 2009-12-17 20:42:39.000000000 -0330
+***************
+*** 188,194 ****
+ size_t length
+ )
+ {
+! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more =
memory */
+ size_t size =3D MAX( BUF_INCR_SIZE, length);
+ =20
+ if (mem_buf_p->buffer =3D=3D NULL) { /* 1st append =
*/
+--- 188,194 ----
+ size_t length
+ )
+ {
+! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate =
more memory */
+ size_t size =3D MAX( BUF_INCR_SIZE, length);
+ =20
+ if (mem_buf_p->buffer =3D=3D NULL) { /* 1st append =
*/
+***************
+*** 1722,1727 ****
+--- 1722,1729 ----
+ sp -=3D 2;
+ while (*sp !=3D '\n') /* Until end of line =
*/
+ mcpp_fputc( *sp++, OUT);
++ mcpp_fputc( '\n', OUT);
++ wrong_line =3D TRUE;
+ }
+ goto end_line;
+ default: /* Not a comment =
*/
+diff -c -r -N ../mcpp-2.7.2/src/system.c ./src/system.c
+*** ../mcpp-2.7.2/src/system.c 2008-11-26 06:23:51.000000000 -0330
+--- ./src/system.c 2009-12-17 20:42:42.000000000 -0330
+***************
+*** 3858,3863 ****
+--- 3858,3866 ----
+ }
+ #endif
+ =20
++ FILEINFO* sh_file;
++ int sh_line;
++=20
+ void sharp(
+ FILEINFO * sharp_file,
+ int flag /* Flag to append to the line for GCC =
*/
+***************
+*** 3868,3875 ****
+ * else (i.e. 'sharp_file' is NULL) 'infile'.
+ */
+ {
+- static FILEINFO * sh_file;
+- static int sh_line;
+ FILEINFO * file;
+ int line;
+ =20
+--- 3871,3876 ----
=3D=3D=3D> Done
--Apple-Mail-69-643193647
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
--Apple-Mail-69-643193647--
More information about the freebsd-ports-bugs
mailing list