Thursday, February 04, 2021

Re: textproc/pinfo: fix for -fno-common and -O0

On Thu, Feb 04, 2021 at 09:10:16PM +0100, Theo Buehler wrote:
> Obvious fix to avoid duplicate definition of use_manual. The conversion
> from inline to static inline fixes the build with -O0. I ran into that
> because I tested with CFLAGS=-fno-common which removed -O2. I can land
> that separately if desired. Regen plist while there.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/textproc/pinfo/Makefile,v
> retrieving revision 1.18
> diff -u -p -r1.18 Makefile
> --- Makefile 12 Jul 2019 20:50:10 -0000 1.18
> +++ Makefile 4 Feb 2021 19:57:03 -0000
> @@ -3,7 +3,7 @@
> COMMENT= info viewer with lynx-style navigation
>
> DISTNAME= pinfo-0.6.9
> -REVISION= 1
> +REVISION= 2
> CATEGORIES= textproc devel
>
> HOMEPAGE= https://alioth.debian.org/frs/?group_id=30592
> Index: patches/patch-src_filehandling_functions_c
> ===================================================================
> RCS file: /cvs/ports/textproc/pinfo/patches/patch-src_filehandling_functions_c,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-src_filehandling_functions_c
> --- patches/patch-src_filehandling_functions_c 19 Nov 2007 18:31:03 -0000 1.2
> +++ patches/patch-src_filehandling_functions_c 4 Feb 2021 19:53:53 -0000
> @@ -1,6 +1,7 @@
> $OpenBSD: patch-src_filehandling_functions_c,v 1.2 2007/11/19 18:31:03 mgrimm Exp $
> ---- src/filehandling_functions.c.orig Sun Jul 8 17:06:45 2007
> -+++ src/filehandling_functions.c Sun Jul 8 17:09:39 2007
> +Index: src/filehandling_functions.c
> +--- src/filehandling_functions.c.orig
> ++++ src/filehandling_functions.c
> @@ -139,6 +139,7 @@ dirpage_lookup(char **type, char ***message, long *lin
> char name[256];
> char file[256];
> @@ -35,3 +36,21 @@ $OpenBSD: patch-src_filehandling_functio
> strncpy(file, filestart + 1, fileend - filestart - 1);
> file[fileend - filestart - 1] = 0;
> strncpy(name, fileend + 1, dot - fileend - 1);
> +@@ -551,7 +551,7 @@ seek_tag_table(FILE * id,int quiet)
> + return 1;
> + }
> +
> +-inline void
> ++static inline void
> + buildcommand(char *dest, char *command, char *filename, const char *tmpfilename)
> + {
> + strcpy(dest, command);
> +@@ -561,7 +561,7 @@ buildcommand(char *dest, char *command, char *filename
> + strcat(dest, tmpfilename);
> + }
> +
> +-inline void
> ++static inline void
> + builddircommand(char *dest, char *command, char *filename, const char *tmpfilename)
> + {
> + strcpy(dest, command);
> Index: patches/patch-src_initializelinks_c
> ===================================================================
> RCS file: patches/patch-src_initializelinks_c
> diff -N patches/patch-src_initializelinks_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_initializelinks_c 4 Feb 2021 19:54:55 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/initializelinks.c
> +--- src/initializelinks.c.orig
> ++++ src/initializelinks.c
> +@@ -75,7 +75,7 @@ compare_tag_table_string(char *base, char *compared)
> + * checks if an item belongs to tag table. returns 1 on success and 0 on
> + * failure. It should be optimised...
> + */
> +-inline int
> ++static inline int
> + exists_in_tag_table(char *item)
> + {
> + if (gettagtablepos(item) != -1)
> Index: patches/patch-src_parse_config_h
> ===================================================================
> RCS file: patches/patch-src_parse_config_h
> diff -N patches/patch-src_parse_config_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_parse_config_h 4 Feb 2021 19:51:07 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +Fix for -fno-common
> +
> +Index: src/parse_config.h
> +--- src/parse_config.h.orig
> ++++ src/parse_config.h
> +@@ -85,7 +85,7 @@ typedef struct colours
> + colours;
> +

No comments:

Post a Comment