We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 822 - 64 bit ifdefs lost during mikmod upgrade
Summary: 64 bit ifdefs lost during mikmod upgrade
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-03 01:36 UTC by Ozkan Sezer
Modified: 2018-08-13 06:16 UTC (History)
1 user (show)

See Also:


Attachments
mikmod 64 bit ifdefs patch (1.35 KB, application/octet-stream)
2009-10-03 01:36 UTC, Ozkan Sezer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2009-10-03 01:36:48 UTC
Created attachment 383 [details]
mikmod 64 bit ifdefs patch

During the mikmod 3.1.12 upgrade, some 64 bit ifdefs were lost.  Attached patch
restores them and also adds a minor win64 ifdef just to be sure.  Regards.

--
Ozkan
Comment 1 Sam Lantinga 2009-10-03 02:24:05 UTC
Fixed, thanks!

I left out the WIN64 check, because I don't think it's needed, and if it is, it should be in both places.
Comment 2 Ozkan Sezer 2009-10-03 02:34:12 UTC
(In reply to comment #1)
> Fixed, thanks!
> 
> I left out the WIN64 check, because I don't think it's needed, and if it is, it
> should be in both places.

The _WIN64 check is needed in mikmod.h because __x86_64 may be defined in that case, and at that place there are some window$ types defined.  In the non-64bit block, there already is a check for _win32 definition and that handles it.
As for mikmod-internals.h for the 64bit case, __x86_64 is not checked so _WIN64 cannot be defined there, and _WIN64 is _LLP64 not _LP64 so we cannot hit it for window$.  However, I would have specifically added __int64 for _WIN64 if I really had known what the purpose of that NATIVE_64BIT_INT thing is.
Comment 3 Sam Lantinga 2009-10-03 03:07:37 UTC
Okay, I switched it to use SDL types. :)
Comment 4 Ozkan Sezer 2009-10-03 03:52:41 UTC
I think you still need to do:

--- mikmod.h~	2009-10-03 13:51:30.000000000 +0300
+++ mikmod.h	2009-10-03 13:53:03.000000000 +0300
@@ -78,8 +78,10 @@ typedef Sint16          SWORD;      /* 2
 typedef Uint16          UWORD;      /* 2 bytes, unsigned */
 typedef Sint32          SLONG;      /* 4 bytes, signed */
 typedef Uint32          ULONG;      /* 4 bytes, unsigned */
+#if !defined(__OS2__) && !defined(__EMX__) && !defined(_WIN32)
 typedef int             BOOL;       /* 0=false, <>0 true */
 typedef char            CHAR;
+#endif
 
 #else
 #ifdef WIN32

.. because BOOL and CHAR are either defined or typedef'ed in window$ case.