From 8a7077d5a97b1431b1b7be26b17e12f3d5d5c654 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 10 Feb 2019 12:57:22 +0100 Subject: [PATCH] Change the way external symbols are defined to avoid COMMON symbols, which don't work on OSX very well. --- util/ack/data.c | 16 ++++++---------- util/ack/data.h | 5 ++--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/util/ack/data.c b/util/ack/data.c index 181e034dc..2a6946597 100644 --- a/util/ack/data.c +++ b/util/ack/data.c @@ -6,15 +6,11 @@ #include "list.h" #include "trans.h" -#ifndef NORCSID -static char rcs_id[] = "$Id$" ; -#endif - -#undef EXTERN -#define EXTERN - +/* Include once without redefining EXTERN, to declare all the symbols as extern. */ #include "data.h" -#ifndef NORCSID -static char rcs_data[] = RCS_DATA ; -#endif +/* And again without EXTERN, to define them here. Without the extern versions above + * then these symbols will all end up as COMMON, which is poorly supported on OSX. */ +#undef EXTERN +#define EXTERN +#include "data.h" diff --git a/util/ack/data.h b/util/ack/data.h index ea845c4f7..faa094c0d 100644 --- a/util/ack/data.h +++ b/util/ack/data.h @@ -2,9 +2,8 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ -#ifndef NORCSID -#define RCS_DATA "$Id$" -#endif + +/* WARNING: don't put guards around this file (there are reasons). See data.c. */ EXTERN char *stopsuffix; /* Suffix to stop at */ EXTERN char *machine; /* The machine id */