[PD-dev] [ pure-data-Patches-2848888 ] (0.43) Windows/Cygwin/MinGW build fixes

SourceForge.net noreply at sourceforge.net
Thu Jul 15 23:40:34 CEST 2010


Patches item #2848888, was opened at 2009-09-02 01:29
Message generated for change (Comment added) made by eighthave
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2848888&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
>Status: Closed
>Resolution: Accepted
Priority: 9
Private: No
Submitted By: Hans-Christoph Steiner (eighthave)
Assigned to: Miller Puckette (millerpuckette)
Summary: (0.43) Windows/Cygwin/MinGW build fixes

Initial Comment:
In order to build on Cygwin and MinGW cleanly and with a simple build system, the macro 'MSW' should be replaced with the automatic macro '_WIN32' (the preceeding underscore is important).  It should be replaced in all .c and .h files, and can be done using a simple replace, like "sed -i 's|MSW|_WIN32|' *.[ch]".  Then the patch attached fixes a couple of minor Cygwin-specific macro tests.  Also, once MSW is replaced with _WIN32, then this chunk of code can also be removed from m_pd.h:


/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
#if defined(NT) && !defined(MSW)
#define MSW
#endif


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

>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2010-07-15 17:40

Message:
almost all of this has been accepted into 0.43

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

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2009-10-28 13:35

Message:
Ok, these patches are pretty messy in their current form.  Miller, let me
know whether you want cleaned up patches, or whether you just want to take
this stuff directly from the pd-gui-rewrite/0.43 branch.

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

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2009-09-03 16:11

Message:
Wait, there's more!  Its a tiny one.ASIO is C++, so Pd should use g++ when
including ASIO, therefore everything needs to build with g++.  From what
I've read, when linking C++ into C, then main() needs to be compiled with
g++ and everything needs to be linked using g++.

So, this newest fix is just a one-liner that g++ pointed out in its
strictness.  Basically there is a malloc() that isn't cast in
u_pdreceive.c:
http://pure-data.svn.sourceforge.net/viewvc/pure-data/branches/pd-gui-rewrite/0.43/src/u_pdreceive.c?r1=12232&r2=12231&pathrev=12232

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

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2009-09-02 18:57

Message:
Ok, so now I had to sort out the HAVE_UNISTD_H define, that one was
basically being used as: #ifndef _WIN32, so I put that in instead. MinGW
has unistd.h, so HAVE_UNISTD_H was causing issues.  But MinGW is WIN32 API,
so it doesn't have all the UNIXy stuff.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2848888&group_id=55736



More information about the Pd-dev mailing list