[mythtv] Ticket #7859: MythTV trunk compilation fixes for win32

Jonathan Martens jonathan at snetram.nl
Fri Jan 8 17:22:13 UTC 2010


On 8-1-2010 17:59, MythTV wrote:
> #7859: MythTV trunk compilation fixes for win32
> ----------------------------------------------------+-----------------------
>   Reporter:  Jonathan Martens<jonathan@…>            |       Owner:  nigel
>       Type:  defect                                  |      Status:  new
>   Priority:  minor                                   |   Milestone:  0.23
> Component:  Ports - Windows                         |     Version:  head
>   Severity:  medium                                  |     Mlocked:  0
> ----------------------------------------------------+-----------------------
>
> Comment(by anonymous):
>
>   You should not remove the #define NOMINMAX from compat.h.  True that mingw
>   already defines it and generates a redefinition warning, but official
>   win32 headers don't (e.g. compiling under VS2008).  Better to leave it in
>   - it's standard practice for dealing with windows min/max mess.

Personally I dislike the use of compat.h for fixes that are not global 
for all the source as it breaks relations and might leave 
inclusions/definitions in there that are not needed in all the source 
code but only a limited area.

I however do not know what the current 'rules'/common practice on the 
use of compat.h are. Perhaps someone here can fill me in or provide 
pointers.

I just had a look back in the revision log and noticed that a lot of 
functionality that has been dropped from compat.h as it was not needed 
is put back in and braking things this patch is trying to fix again, 
albeit wrong perhaps.

I noticed that a lot of

#include usleep.h

were moved out of the code and back into the compat.h file but inluded 
only when compiling against VS2008 due to the preprocessor definitions 
(r23037). These preprocessor defintions make compilation in MinGW fail 
on it's turn again, which the patch to this ticket tries to restore (but 
it might not take into account VS2008 on it's turn).

Perhaps someone can state what the proper path is to do so as during the 
history of my part taking in MythTV I have seen that we have allowed for 
individual usleep.h inclusion when needed and I see them being moved 
back to compat.h again now.
Since we are implementing race conditions like this I think some 
guidance by the powers that be might be required.

Kind regards,

Jonathan


More information about the mythtv-dev mailing list