textproc/xlhtml: Fix build with '-fno-common'

Fix build with '-fno-common', default of GCC 10 and Clang 11

While here, pet linters.

PR:	248774
Submitted by:	yasu@utahime.org
This commit is contained in:
Fernando Apesteguía 2020-08-21 10:49:35 +00:00
parent 199a7213ed
commit 8144cb9250
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=545588
4 changed files with 45 additions and 5 deletions

View File

@ -14,11 +14,16 @@ COMMENT= Convert Excel and PowerPoint files to HTML and text
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
GNU_CONFIGURE= yes
USES= autoreconf gmake tar:tgz
GNU_CONFIGURE= yes
OPTIONS_DEFINE= DOCS
post-build:
@${STRIP_CMD} ${WRKSRC}/xlhtml/xlhtml
@${STRIP_CMD} ${WRKSRC}/ppthtml/ppthtml
post-install-DOCS-on:
.for dir in xlhtml ppthtml
@${MKDIR} ${STAGEDIR}${DOCSDIR}/${dir}
@ -27,8 +32,4 @@ post-install-DOCS-on:
${STAGEDIR}${DOCSDIR}/${dir}
.endfor
post-build:
@${STRIP_CMD} ${WRKSRC}/xlhtml/xlhtml
@${STRIP_CMD} ${WRKSRC}/ppthtml/ppthtml
.include <bsd.port.mk>

View File

@ -0,0 +1,15 @@
--- xlhtml/ascii.c.orig 2002-04-11 03:25:17 UTC
+++ xlhtml/ascii.c
@@ -48,9 +48,9 @@ extern void output_cell( cell *, int);
extern uni_string author;
extern int null_string(U8 *);
extern int Csv;
-work_sheet **ws_array;
-font_attr **font_array;
-xf_attr **xf_array;
+extern work_sheet **ws_array;
+extern font_attr **font_array;
+extern xf_attr **xf_array;
extern int IsCellNumeric(cell *);
extern int IsCellSafe(cell *);

View File

@ -0,0 +1,13 @@
--- xlhtml/html.c.orig 2002-04-11 04:01:05 UTC
+++ xlhtml/html.c
@@ -47,8 +47,8 @@ extern void output_cell( cell *, int);
extern uni_string author;
extern int null_string(U8 *);
extern unsigned int next_font;
-work_sheet **ws_array;
-font_attr **font_array;
+extern work_sheet **ws_array;
+extern font_attr **font_array;
void output_header(void);
void output_footer(void);

View File

@ -0,0 +1,11 @@
--- xlhtml/xml.c.orig 2002-04-11 03:25:17 UTC
+++ xlhtml/xml.c
@@ -33,7 +33,7 @@ extern void update_default_alignment(unsigned int, int
extern void output_cell( cell *, int);
extern uni_string author;
-work_sheet **ws_array;
+extern work_sheet **ws_array;
void OutputTableXML(void)