make compile error

From: RICHARD BENNETT <raob_at_mac.com>
Date: Sun Dec 16 2018 - 13:42:46 CET

I am receiving the following two errors, and I don’t 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:
      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:
      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 */

-----------------------------------------------
To unsubscribe from this list, send a message to
abiword-user-request@abisource.com with the word
unsubscribe in the message body.
Received on Sun Dec 16 13:42:52 2018

This archive was generated by hypermail 2.1.8 : Sun Dec 16 2018 - 13:42:52 CET