From f874b9a4016a8ce490ecccfee92e4edeaf316a7d Mon Sep 17 00:00:00 2001 From: wlemb Date: Fri, 20 Apr 2001 13:34:56 +0000 Subject: `Version_string' as C++ object was not visible to linker from C object files. Add `const' to `Version_string'. * src/utils/pfbtops/pfbtops.c (main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc (main), src/preproc/tbl/main.cc (main), src/preproc/pic/main.cc (main), src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc (main), src/preproc/html/pre-html.cc (scanArguments), src/preproc/refer/refer.cc (main), src/preproc/soelim/soelim.cc (main), src/devices/grotty/tty.cc (main), src/devices/grodvi/dvi.cc (main), src/devices/grolj4/lj4.cc (main), src/devices/grohtml/post-html.cc (main), src/devices/grolbp/lbp.cc (main), src/utils/tfmtodit/tfmtodit.cc (main), src/utils/hpftodit/hpftodit.cc (main), src/utils/lookbib/lookbib.cc (main), src/utils/indxbib/indxbib.cc (main), src/utils/lkbib/lkbib.cc (main), src/utils/addftinfo/addftinfo.cc (main): Implement it. * src/roff/groff/pipeline.c: Add _UWIN. * src/include/nonposix.h: Ditto. * src/include/lib.h: Use HAVE_STRERROR. * src/roff/groff/pipeline.c: Ditto. * src/preproc/html/pre-html.cc: Remove declaration of `strerror'. * src/libs/libgroff/Makefile.sub (version.cc): Add `extern "C"'. * src/utils/pfbtops/pfbtops.c: Add copyright notice. * win32-diffs: Updated. * src/utils/hpftodit/hpftodit.cc (read_map): Fix compiler warning. --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ src/devices/grodvi/dvi.cc | 3 ++- src/devices/grohtml/post-html.cc | 4 ++-- src/devices/grolbp/lbp.cc | 3 ++- src/devices/grolj4/lj4.cc | 3 ++- src/devices/grops/ps.cc | 4 ++-- src/devices/grotty/tty.cc | 3 ++- src/include/lib.h | 2 +- src/include/nonposix.h | 3 ++- src/libs/libgroff/Makefile.sub | 2 +- src/preproc/eqn/main.cc | 2 +- src/preproc/grn/main.cc | 3 ++- src/preproc/html/pre-html.cc | 4 +--- src/preproc/pic/main.cc | 2 +- src/preproc/refer/refer.cc | 3 ++- src/preproc/soelim/soelim.cc | 2 +- src/preproc/tbl/main.cc | 3 ++- src/roff/groff/groff.cc | 3 ++- src/roff/groff/pipeline.c | 10 ++++++++-- src/roff/troff/input.cc | 3 ++- src/utils/addftinfo/addftinfo.cc | 3 ++- src/utils/hpftodit/hpftodit.cc | 5 +++-- src/utils/indxbib/indxbib.cc | 2 +- src/utils/lkbib/lkbib.cc | 3 ++- src/utils/lookbib/lookbib.cc | 2 +- src/utils/pfbtops/pfbtops.c | 21 ++++++++++++++++++++- src/utils/tfmtodit/tfmtodit.cc | 3 ++- win32-diffs | 4 ++-- 28 files changed, 104 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 911739ec..ae6baefe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2001-04-20 Bruce Lilly + + `Version_string' as C++ object was not visible to linker from C + object files. + Add `const' to `Version_string'. + + * src/utils/pfbtops/pfbtops.c (main), src/roff/groff/groff.cc + (main), src/roff/troff/input.cc (main), src/preproc/tbl/main.cc + (main), src/preproc/pic/main.cc (main), src/preproc/eqn/main.cc + (main), src/preproc/grn/main.cc (main), src/preproc/html/pre-html.cc + (scanArguments), src/preproc/refer/refer.cc (main), + src/preproc/soelim/soelim.cc (main), src/devices/grotty/tty.cc + (main), src/devices/grodvi/dvi.cc (main), src/devices/grolj4/lj4.cc + (main), src/devices/grohtml/post-html.cc (main), + src/devices/grolbp/lbp.cc (main), src/utils/tfmtodit/tfmtodit.cc + (main), src/utils/hpftodit/hpftodit.cc (main), + src/utils/lookbib/lookbib.cc (main), src/utils/indxbib/indxbib.cc + (main), src/utils/lkbib/lkbib.cc (main), + src/utils/addftinfo/addftinfo.cc (main): Implement it. + + * src/roff/groff/pipeline.c: Add _UWIN. + * src/include/nonposix.h: Ditto. + +2001-04-20 Werner LEMBERG + + * src/include/lib.h: Use HAVE_STRERROR. + * src/roff/groff/pipeline.c: Ditto. + * src/preproc/html/pre-html.cc: Remove declaration of `strerror'. + * src/libs/libgroff/Makefile.sub (version.cc): Add `extern "C"'. + * src/utils/pfbtops/pfbtops.c: Add copyright notice. + * win32-diffs: Updated. + * src/utils/hpftodit/hpftodit.cc (read_map): Fix compiler warning. + 2001-04-19 Werner LEMBERG * src/preproc/html/pre-html.cc (scanArguments): Use `troff_command' diff --git a/src/devices/grodvi/dvi.cc b/src/devices/grodvi/dvi.cc index ec227472..b5b7c49d 100644 --- a/src/devices/grodvi/dvi.cc +++ b/src/devices/grodvi/dvi.cc @@ -22,6 +22,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "driver.h" #include "nonposix.h" +extern "C" const char *Version_string; + #define DEFAULT_LINEWIDTH 40 static int linewidth = DEFAULT_LINEWIDTH; @@ -863,7 +865,6 @@ int main(int argc, char **argv) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grodvi (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/devices/grohtml/post-html.cc b/src/devices/grohtml/post-html.cc index be681b8f..334de85c 100644 --- a/src/devices/grohtml/post-html.cc +++ b/src/devices/grohtml/post-html.cc @@ -39,6 +39,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include +extern "C" const char *Version_string; + #if !defined(TRUE) # define TRUE (1==1) #endif @@ -2771,7 +2773,6 @@ html_printer::~html_printer() header.write_headings(stdout, FALSE); write_rule(); { - extern const char *Version_string; html.begin_comment("Creator : ") .put_string("groff ") .put_string("version ") @@ -2884,7 +2885,6 @@ int main(int argc, char **argv) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU post-grohtml (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc index c26d3bc1..ec8c7b1f 100644 --- a/src/devices/grolbp/lbp.cc +++ b/src/devices/grolbp/lbp.cc @@ -33,6 +33,8 @@ TODO #include "nonposix.h" +extern "C" const char *Version_string; + static short int papersize = -1, // papersize orientation = -1 , // orientation paperlength = 0, // Custom Paper size @@ -715,7 +717,6 @@ int main(int argc, char **argv) case 'l' : orientation = 1; break; case 'v' : { - extern const char *Version_string; printf("GNU grolbp (groff) version %s\n", Version_string); exit(0); diff --git a/src/devices/grolj4/lj4.cc b/src/devices/grolj4/lj4.cc index e18298f8..6829acb1 100644 --- a/src/devices/grolj4/lj4.cc +++ b/src/devices/grolj4/lj4.cc @@ -35,6 +35,8 @@ X command to include bitmap graphics #include "driver.h" #include "nonposix.h" +extern "C" const char *Version_string; + static struct { const char *name; int code; @@ -647,7 +649,6 @@ int main(int argc, char **argv) } case 'v': { - extern const char *Version_string; printf("GNU grolj4 (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/devices/grops/ps.cc b/src/devices/grops/ps.cc index 8c8dabb1..a467f047 100644 --- a/src/devices/grops/ps.cc +++ b/src/devices/grops/ps.cc @@ -33,6 +33,8 @@ extern "C" { } #endif /* NEED_DECLARATION_PUTENV */ +extern "C" const char *Version_string; + static int landscape_flag = 0; static int manual_feed_flag = 0; static int ncopies = 1; @@ -1119,7 +1121,6 @@ ps_printer::~ps_printer() putchar('\n'); out.set_file(stdout); { - extern const char *Version_string; out.begin_comment("Creator:") .comment_arg("groff") .comment_arg("version") @@ -1495,7 +1496,6 @@ int main(int argc, char **argv) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grops (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/devices/grotty/tty.cc b/src/devices/grotty/tty.cc index a8ee0653..d13adbfe 100644 --- a/src/devices/grotty/tty.cc +++ b/src/devices/grotty/tty.cc @@ -21,6 +21,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "driver.h" #include "device.h" +extern "C" const char *Version_string; + #ifndef SHRT_MIN #define SHRT_MIN (-32768) #endif @@ -442,7 +444,6 @@ int main(int argc, char **argv) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grotty (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/include/lib.h b/src/include/lib.h index 08643220..b456fadb 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -19,7 +19,7 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { -#ifndef strerror +#ifndef HAVE_STRERROR char *strerror(int); #endif const char *i_to_a(int); diff --git a/src/include/nonposix.h b/src/include/nonposix.h index 51449832..abd7d1e9 100644 --- a/src/include/nonposix.h +++ b/src/include/nonposix.h @@ -27,7 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # define setmode(f,m) _setmode(f,m) #endif -#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__)) +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__)) /* Binary I/O nuisances. Note: "setmode" is right for DJGPP and Borland; Windows compilers might need _setmode or some such. */ diff --git a/src/libs/libgroff/Makefile.sub b/src/libs/libgroff/Makefile.sub index 5ce0691a..6368f41f 100644 --- a/src/libs/libgroff/Makefile.sub +++ b/src/libs/libgroff/Makefile.sub @@ -80,5 +80,5 @@ version.cc: $(top_srcdir)/VERSION $(top_srcdir)/REVISION @echo Making version.cc @echo const char \*version_string = \"$(version)\"\; >$@ @echo const char \*revision_string = \"$(revision)\"\; >>$@ - @echo const char \*Version_string = \"$(version).$(revision)\"\; | \ + @echo extern \"C\" const char \*Version_string = \"$(version).$(revision)\"\; | \ sed -e 's/\.0\"/\"/' >>$@ diff --git a/src/preproc/eqn/main.cc b/src/preproc/eqn/main.cc index 6dc03f0b..f53ffa38 100644 --- a/src/preproc/eqn/main.cc +++ b/src/preproc/eqn/main.cc @@ -30,6 +30,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define STARTUP_FILE "eqnrc" extern int yyparse(); +extern "C" const char *Version_string; static char *delim_search (char *, int); static int inline_equation (FILE *, string &, string &); @@ -303,7 +304,6 @@ int main(int argc, char **argv) break; case 'v': { - extern const char *Version_string; printf("GNU eqn (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/preproc/grn/main.cc b/src/preproc/grn/main.cc index 92e64c6a..efb33a95 100644 --- a/src/preproc/grn/main.cc +++ b/src/preproc/grn/main.cc @@ -82,6 +82,8 @@ #include "error.h" #include "defs.h" +extern "C" const char *Version_string; + /* database imports */ extern void HGPrintElt(ELT *element, int baseline); @@ -282,7 +284,6 @@ main(int argc, case '-': if (strcmp(*argv,"--version")==0) { case 'v': - extern const char *Version_string; printf("GNU grn (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/preproc/html/pre-html.cc b/src/preproc/html/pre-html.cc index c87612ef..3a9d6309 100644 --- a/src/preproc/html/pre-html.cc +++ b/src/preproc/html/pre-html.cc @@ -23,7 +23,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include -#include #include #include #include @@ -47,7 +46,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PID_T int #endif /* not _POSIX_VERSION */ -extern char *strerror(); +extern "C" const char *Version_string; #include "pre-html.h" #include "pushbackbuffer.h" @@ -1008,7 +1007,6 @@ int scanArguments (int argc, char **argv) vertical_offset = atoi((char *)(argv[i]+2)); } else if ((strcmp(argv[i], "-v") == 0) || (strcmp(argv[i], "--version") == 0)) { - extern const char *Version_string; printf("GNU pre-grohtml (groff) version %s\n", Version_string); exit(0); } else if ((strcmp(argv[i], "-h") == 0) diff --git a/src/preproc/pic/main.cc b/src/preproc/pic/main.cc index 87d2b930..b795d481 100644 --- a/src/preproc/pic/main.cc +++ b/src/preproc/pic/main.cc @@ -21,6 +21,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "pic.h" extern int yyparse(); +extern "C" const char *Version_string; output *out; @@ -568,7 +569,6 @@ int main(int argc, char **argv) break; case 'v': { - extern const char *Version_string; printf("GNU pic (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/preproc/refer/refer.cc b/src/preproc/refer/refer.cc index b6cefc58..c39def73 100644 --- a/src/preproc/refer/refer.cc +++ b/src/preproc/refer/refer.cc @@ -25,6 +25,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "search.h" #include "command.h" +extern "C" const char *Version_string; + const char PRE_LABEL_MARKER = '\013'; const char POST_LABEL_MARKER = '\014'; const char LABEL_MARKER = '\015'; // label_type is added on @@ -344,7 +346,6 @@ int main(int argc, char **argv) } if (strcmp(opt,"-version")==0) { case 'v': - extern const char *Version_string; printf("GNU refer (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/preproc/soelim/soelim.cc b/src/preproc/soelim/soelim.cc index 90b8d1c7..a6040045 100644 --- a/src/preproc/soelim/soelim.cc +++ b/src/preproc/soelim/soelim.cc @@ -36,6 +36,7 @@ static char **include_list; int compatible_flag = 0; extern int interpret_lf_args(const char *); +extern "C" const char *Version_string; int do_file(const char *filename); @@ -77,7 +78,6 @@ int main(int argc, char **argv) switch (opt) { case 'v': { - extern const char *Version_string; printf("GNU soelim (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/preproc/tbl/main.cc b/src/preproc/tbl/main.cc index 4031f434..b1b14a71 100644 --- a/src/preproc/tbl/main.cc +++ b/src/preproc/tbl/main.cc @@ -25,6 +25,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define MAX_POINT_SIZE 99 #define MAX_VERTICAL_SPACING 72 +extern "C" const char *Version_string; + static int compatible_flag = 0; class table_input { @@ -1470,7 +1472,6 @@ int main(int argc, char **argv) break; case 'v': { - extern const char *Version_string; printf("GNU tbl (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/roff/groff/groff.cc b/src/roff/groff/groff.cc index aaca4e1f..7e95c33e 100644 --- a/src/roff/groff/groff.cc +++ b/src/roff/groff/groff.cc @@ -82,6 +82,8 @@ public: void print(int is_last, FILE *fp); }; +extern "C" const char *Version_string; + int lflag = 0; char *spooler = 0; char *postdriver = 0; @@ -175,7 +177,6 @@ int main(int argc, char **argv) case 'v': vflag = 1; { - extern const char *Version_string; printf("GNU groff version %s\n", Version_string); printf("Copyright (C) 1989-2001 Free Software Foundation, Inc.\n" "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" diff --git a/src/roff/groff/pipeline.c b/src/roff/groff/pipeline.c index a4573ba7..f26608ff 100644 --- a/src/roff/groff/pipeline.c +++ b/src/roff/groff/pipeline.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -34,7 +35,11 @@ Compile options are: #include #endif +#ifdef HAVE_STRERROR +#include +#else extern char *strerror(); +#endif #ifdef _POSIX_VERSION @@ -98,7 +103,8 @@ static char *i_to_a P((int)); have a workable groff by using the good-ole DOS pipe simulation via temporary files... */ -#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__)) +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__)) #include #include diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 26de4dd0..4905305a 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -73,6 +73,8 @@ extern "C" { // initial size of buffer for reading names; expanded as necessary #define ABUF_SIZE 16 +extern "C" const char *Version_string; + #ifdef COLUMN void init_column_requests(); #endif /* COLUMN */ @@ -6097,7 +6099,6 @@ int main(int argc, char **argv) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU troff (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/utils/addftinfo/addftinfo.cc b/src/utils/addftinfo/addftinfo.cc index 69fb8d48..eb222d9b 100644 --- a/src/utils/addftinfo/addftinfo.cc +++ b/src/utils/addftinfo/addftinfo.cc @@ -31,6 +31,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "cset.h" #include "guess.h" +extern "C" const char *Version_string; + static void usage(FILE *stream); static void usage(); static void version(); @@ -142,7 +144,6 @@ static void usage() static void version() { - extern const char *Version_string; printf("GNU addftinfo (groff) version %s\n", Version_string); exit(0); } diff --git a/src/utils/hpftodit/hpftodit.cc b/src/utils/hpftodit/hpftodit.cc index 3034847a..15f6f7fe 100644 --- a/src/utils/hpftodit/hpftodit.cc +++ b/src/utils/hpftodit/hpftodit.cc @@ -41,6 +41,8 @@ put filename in error messages (or fix lib) #include "cset.h" #include "nonposix.h" +extern "C" const char *Version_string; + #define SIZEOF(v) (sizeof(v)/sizeof(v[0])) const int MULTIPLIER = 3; @@ -226,7 +228,6 @@ int main(int argc, char **argv) break; case 'v': { - extern const char *Version_string; printf("GNU hpftodit (groff) version %s\n", Version_string); exit(0); } @@ -782,7 +783,7 @@ int read_map(const char *file) fclose(fp); return 0; } - if (n >= msl_name_table_size) { + if ((size_t)n >= msl_name_table_size) { size_t old_size = msl_name_table_size; name_list **old_table = msl_name_table; msl_name_table_size = n + 256; diff --git a/src/utils/indxbib/indxbib.cc b/src/utils/indxbib/indxbib.cc index ee4543b5..403aa6fe 100644 --- a/src/utils/indxbib/indxbib.cc +++ b/src/utils/indxbib/indxbib.cc @@ -38,6 +38,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "nonposix.h" extern "C" { + const char *Version_string; // Solaris 2.5.1 has these functions, // but its stdlib.h fails to declare them. char *mktemp(char *); @@ -180,7 +181,6 @@ int main(int argc, char **argv) break; case 'v': { - extern const char *Version_string; printf("GNU indxbib (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/utils/lkbib/lkbib.cc b/src/utils/lkbib/lkbib.cc index ee6b05ed..f7d6ea5d 100644 --- a/src/utils/lkbib/lkbib.cc +++ b/src/utils/lkbib/lkbib.cc @@ -32,6 +32,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "refid.h" #include "search.h" +extern "C" const char *Version_string; + static void usage(FILE *stream) { fprintf(stream, "usage: %s [-nv] [-p database] [-i XYZ] [-t N] keys ...\n", @@ -78,7 +80,6 @@ int main(int argc, char **argv) } case 'v': { - extern const char *Version_string; printf("GNU lkbib (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/utils/lookbib/lookbib.cc b/src/utils/lookbib/lookbib.cc index 103cd0b5..b742a4bd 100644 --- a/src/utils/lookbib/lookbib.cc +++ b/src/utils/lookbib/lookbib.cc @@ -34,6 +34,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { int isatty(int); + const char *Version_string; } static void usage(FILE *stream) @@ -76,7 +77,6 @@ int main(int argc, char **argv) } case 'v': { - extern const char *Version_string; printf("GNU lookbib (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/utils/pfbtops/pfbtops.c b/src/utils/pfbtops/pfbtops.c index 2159dbd8..03fc4b41 100644 --- a/src/utils/pfbtops/pfbtops.c +++ b/src/utils/pfbtops/pfbtops.c @@ -1,3 +1,22 @@ +/* Copyright (C) 1992, 2001 Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* This translates ps fonts in .pfb format to ASCII ps files. */ #include @@ -42,7 +61,7 @@ int main(argc, argv) switch (opt) { case 'v': { - extern char *Version_string; + extern const char *Version_string; printf("GNU pfbtops (groff) version %s\n", Version_string); exit(0); break; diff --git a/src/utils/tfmtodit/tfmtodit.cc b/src/utils/tfmtodit/tfmtodit.cc index cb505e45..06b5d185 100644 --- a/src/utils/tfmtodit/tfmtodit.cc +++ b/src/utils/tfmtodit/tfmtodit.cc @@ -59,6 +59,8 @@ both be zero. */ #include "cset.h" #include "nonposix.h" +extern "C" const char *Version_string; + /* Values in the tfm file should be multiplied by this. */ #define MULTIPLIER 1 @@ -717,7 +719,6 @@ int main(int argc, char **argv) } case 'v': { - extern const char *Version_string; printf("GNU tfmtodit (groff) version %s\n", Version_string); exit(0); break; diff --git a/win32-diffs b/win32-diffs index f00f1b9e..8dd1dc5b 100644 --- a/win32-diffs +++ b/win32-diffs @@ -2782,7 +2782,7 @@ diff -aruN groff/src/include/defs.h groff.win32/src/include/defs.h + +#define FONTPATH "c:/groff/font" + -+#define MACROPATH "c:/groff/tmac;c:/groff/mm" ++#define MACROPATH "c:/groff/tmac;c:/groff/mm" + +#define DEVICE "ps" + @@ -2892,7 +2892,7 @@ diff -aruN groff/src/libs/libgroff/version.cc groff.win32/src/libs/libgroff/vers @@ -0,0 +1,3 @@ +const char *version_string = "1.17"; +const char *revision_string = "0"; -+const char *Version_string = "1.17"; ++extern "C" const char *Version_string = "1.17"; diff -aruN groff/src/preproc/eqn/Makefile.msc groff.win32/src/preproc/eqn/Makefile.msc --- groff/src/preproc/eqn/Makefile.msc Thu Jan 1 00:00:00 1970 +++ groff.win32/src/preproc/eqn/Makefile.msc Wed May 17 08:57:48 2000 -- cgit v1.2.1