[Expat-bugs] [ expat-Patches-403581 ] Fix compile problem on BeOS

nobody nobody@sourceforge.net
Fri, 02 Mar 2001 00:21:36 -0800


Patches #403581, was updated on 2001-02-03 14:24
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=403581&group_id=10127

Category: None
Group: None
Status: Closed
Priority: 5
Submitted By: Sam TH
Assigned to: Fred L. Drake, Jr.
Summary: Fix compile problem on BeOS

Initial Comment:
Using __attribute__ only works on Windows machines, but BeOS defines __declspec.  

----------------------------------------------------------------------

Comment By: Sam TH
Date: 2001-03-02 00:21

Message:
Logged In: YES 
user_id=48667

I'm pretty sure it uses it to declare symbols as public,
which is the way windows uses it AFAIK.  I don't develop on
either system, but the definition was causing syntax errors
on BeOS machines I was building on.  

Wait, I have discovered the source of the error.  It's GCC
(which is the compiler I was using) that was failing to
understand __declspec properly.   Most likely, if the
Metroworks compiler was used, __declspec would be
understood, and shared libs would be properly generated.  It
seems neither is possible with GCC.

The solution seems to be to add an #ifdef for GNU C, instead
of just for BeOS.  

Reference: 
http://www.bespecific.com/dialog/bedevtalk/archive/980315/0155.html

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr.
Date: 2001-02-28 19:23

Message:
Logged In: YES 
user_id=3066

Checked in as lib/expat.h.in revision 1.3.

Sam, can you tell us how __declspec *is* used on BeOS, and why it's different from the Windows use?  I couldn't find it searching be.com or in the index of the O'Reilly book I have on BeOS (unread since I don't have a BeOS box).

Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=403581&group_id=10127