Opened 9 years ago

Closed 8 years ago

#9645 closed Patch - Bug Fix (fixed)

[PATCH] WIN32_LEAN_AND_MEAN

Reported by: Lawrence Rust <lvr@…> Owned by: beirdo
Priority: minor Milestone: 0.25
Component: Ports - Windows Version: Unspecified
Severity: medium Keywords: Windows
Cc: Ticket locked: no

Description

This patch defines WIN32_LEAN_AND_MEAN and NOMINMAX when building mythtv and mythplugins for Windows. This change should avoid a lot of name hijacking that occurs when including windows.h. The patch also fixes several files that were missing explicit headers.

Attachments (1)

win32-lean.diff (2.9 KB) - added by Lawrence Rust <lvr@…> 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Lawrence Rust <lvr@…>

Attachment: win32-lean.diff added

comment:1 Changed 8 years ago by beirdo

Status: newinfoneeded_new

Is this still necessary? Or has this been worked out in subsequent patches?

comment:2 Changed 8 years ago by Lawrence Rust <lvr@…>

This patch isn't _necessary_ to build Myth for Windows but it does reduce the probability of problems in the future. It removes a lot of superfluous names and defines from the global namespace and forces programmers to think about and explicitly add headers for the Win32 functions that they use.

NB by default VisualC defines these for all new projects.

comment:3 Changed 8 years ago by Raymond Wagner

Status: infoneeded_newnew

comment:4 Changed 8 years ago by beirdo

Owner: changed from Nigel to beirdo
Status: newassigned

comment:5 Changed 8 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

Define WIN32_LEAN_AND_MEAN and NOMINMAX for MingW

This patch defines WIN32_LEAN_AND_MEAN and NOMINMAX when building mythtv and mythplugins for Windows. This change should avoid a lot of name hijacking that occurs when including windows.h. The patch also fixes several files that were missing explicit headers.

Closes #9645

Signed-off-by: Gavin Hurlbut <ghurlbut@…>

Branch: master Changeset: acadd66dbd50be2a8b98031d2f1d7400fbca951f

Note: See TracTickets for help on using tickets.