make compile error

RICHARD BENNETT <[email protected]> Sun, 16 Dec 2018 07:42:46 -0500
Newsgroups gmane.editors.abiword.user
Message-ID <[email protected]>

--Apple-Mail=_D09265BA-B8D5-4EE9-9DFB-00B863A67BFC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

I am receiving the following two errors, and I don=E2=80=99t know how to =
fix the code in the ut_unixTimer.h header file.  Can anyone help me out? =
 I am compiling on macOS 10.14.2 with GNU make and all standard Xcode =
commands and have installed all dependencies needed for building =
AbiWord.

In file included from xap_CocoaTimer.cpp:28:
../../../../src/af/util/unix/ut_unixTimer.h:33:16: error: redefinition =
of
      'NSMutableDictionary' as different kind of symbol
typedef struct NSMutableDictionary;
               ^
=
/System/Library/Frameworks/AppKit.framework/Headers/NSPageController.h:16:=
8: note:=20
      previous definition is here
@class NSMutableDictionary, NSView;
       ^
In file included from xap_CocoaTimer.cpp:28:
../../../../src/af/util/unix/ut_unixTimer.h:34:16: error: redefinition =
of
      'NSLock' as different kind of symbol
typedef struct NSLock;
               ^
/System/Library/Frameworks/AppKit.framework/Headers/NSDrawer.h:19:8: =
note:=20
      previous definition is here
@class NSLock;



Pasted ut_unixTimer.h below:
#ifndef UT_UNIXTIMER_H
#define UT_UNIXTIMER_H

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "ut_timer.h"


#ifdef TOOLKIT_COCOA
typedef struct NSMutableDictionary;
typedef struct NSLock;

#endif


class UT_UNIXTimer : public UT_Timer
{
public:
	UT_UNIXTimer(UT_WorkerCallback pCallback, void* pData);
	virtual ~UT_UNIXTimer();

	virtual UT_sint32 set(UT_uint32 iMilliseconds);
	virtual void stop();
	virtual void start();
private:
	typedef UT_sint32 millisec_t;
	millisec_t m_iMilliseconds;
	UT_uint32 m_iGtkTimerId;

#ifdef TOOLKIT_COCOA
	/* these are here for Cocoa timer */
	static NSLock* s_timerMutex;
	static NSMutableDictionary* s_timerIds;
	static int s_lastTimerId;

	friend void _checkLock(void);
	friend void XAP_stopCocoaTimer (UT_uint32 timerId);
	friend UT_uint32 XAP_newCocoaTimer (UT_uint32 time, int =
(*proc)(void *), void *p);
#endif



};

#endif /* UT_UNIXTIMER_H */


--Apple-Mail=_D09265BA-B8D5-4EE9-9DFB-00B863A67BFC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">I =
am receiving the following two errors, and I don=E2=80=99t know how to =
fix the code in the<font face=3D"Noto Mono" class=3D""> =
ut_unixTimer.h</font> header file. &nbsp;Can anyone help me out? &nbsp;I =
am compiling on macOS 10.14.2 with GNU make and all standard Xcode =
commands and have installed all dependencies needed for building =
AbiWord.<div class=3D""><br class=3D""></div><div class=3D""><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">In file =
included from xap_CocoaTimer.cpp:28:</span></div><div style=3D"margin: =
0px; font-stretch: normal; font-size: 11px; line-height: normal; =
font-family: Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><b =
class=3D"">../../../../src/af/util/unix/ut_unixTimer.h:33:16: =
</b></span><span style=3D"font-variant-ligatures: no-common-ligatures; =
color: #b42419" class=3D""><b class=3D"">error: </b></span><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><b =
class=3D"">redefinition of</b></span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><b class=3D"">&nbsp; &nbsp; &nbsp; =
'NSMutableDictionary' as different kind of symbol</b></span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">typedef =
struct NSMutableDictionary;</span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo; color: rgb(47, 180, 29);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><b =
class=3D"">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
^</b></span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><b =
class=3D"">/System/Library/Frameworks/AppKit.framework/Headers/NSPageContr=
oller.h:16:8: note:&nbsp;</b></span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">&nbsp; &nbsp; &nbsp; previous definition =
is here</span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">@class NSMutableDictionary, NSView;</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><b class=3D"">&nbsp;&nbsp; &nbsp; &nbsp; =
^</b></span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">In file included from xap_CocoaTimer.cpp:28:</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><b =
class=3D"">../../../../src/af/util/unix/ut_unixTimer.h:34:16: =
</b></span><span style=3D"font-variant-ligatures: no-common-ligatures; =
color: #b42419" class=3D""><b class=3D"">error: </b></span><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><b =
class=3D"">redefinition of</b></span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><b class=3D"">&nbsp; &nbsp; &nbsp; =
'NSLock' as different kind of symbol</b></span></div><div style=3D"margin:=
 0px; font-stretch: normal; font-size: 11px; line-height: normal; =
font-family: Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">typedef struct NSLock;</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><b class=3D"">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; ^</b></span></div><div style=3D"margin: 0px; font-stretch: =
normal; font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><b =
class=3D"">/System/Library/Frameworks/AppKit.framework/Headers/NSDrawer.h:=
19:8: note:&nbsp;</b></span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">&nbsp; &nbsp; &nbsp; previous definition =
is here</span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">@class NSLock;</span></div></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><br class=3D""></span></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">Pasted ut_unixTimer.h =
below:</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures;" class=3D""><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">#ifndef UT_UNIXTIMER_H</span></font></div><div style=3D"margin:=
 0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">#define UT_UNIXTIMER_H</span></font></div><div style=3D"margin:=
 0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">#ifdef =
HAVE_CONFIG_H</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">#include "config.h"</span></font></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">#endif</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">#include =
"ut_timer.h"</span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">#ifdef =
TOOLKIT_COCOA</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">typedef struct NSMutableDictionary;</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D"">typedef struct NSLock;</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><br class=3D""></span></font></div><div style=3D"margin:=
 0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">#endif</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">class =
UT_UNIXTimer : public UT_Timer</span></font></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">{</span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" =
class=3D"">public:</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>UT_UNIXTimer(UT_WorkerCallback pCallback, void* =
pData);</span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>virtual =
~UT_UNIXTimer();</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>virtual =
UT_sint32 set(UT_uint32 iMilliseconds);</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>virtual void =
stop();</span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>virtual =
void start();</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D"">private:</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>typedef UT_sint32 millisec_t;</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>millisec_t =
m_iMilliseconds;</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>UT_uint32 m_iGtkTimerId;</span></font></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">#ifdef =
TOOLKIT_COCOA</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>/* these are here for Cocoa timer */</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>static NSLock* =
s_timerMutex;</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>static NSMutableDictionary* s_timerIds;</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>static int =
s_lastTimerId;</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>friend =
void _checkLock(void);</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" =
class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>friend void XAP_stopCocoaTimer (UT_uint32 =
timerId);</span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>friend =
UT_uint32 XAP_newCocoaTimer (UT_uint32 time, int (*proc)(void *), void =
*p);</span></font></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><font face=3D"Menlo" class=3D""><span =
style=3D"font-size: 11px;" class=3D"">#endif</span></font></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><font face=3D"Menlo" class=3D""><span style=3D"font-size: =
11px;" class=3D""><br class=3D""></span></font></div><div style=3D"margin:=
 0px; font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" =
class=3D"">};</span></font></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><font =
face=3D"Menlo" class=3D""><span style=3D"font-size: 11px;" class=3D""><br =
class=3D""></span></font></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><font face=3D"Menlo" =
class=3D""><span style=3D"font-size: 11px;" class=3D"">#endif /* =
UT_UNIXTIMER_H */</span></font></div><div style=3D"font-family: Menlo; =
font-size: 11px;" class=3D""><br =
class=3D""></div></span></div></body></html>=

--Apple-Mail=_D09265BA-B8D5-4EE9-9DFB-00B863A67BFC--
-----------------------------------------------
To unsubscribe from this list, send a message to
[email protected] with the word
unsubscribe in the message body.