SDL library header issue
ryandesign at macports.org
Sat May 22 05:08:51 PDT 2010
On May 21, 2010, at 16:55, Michael_google gmail_Gersten wrote:
> So what's happening in LittleLong()? It's in
> /opt/local/include/SDL/SDL_endian.h, and there's a set of ifdef's,
> optimized assembler inlines, etc.
> But it starts with
> #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
> So what does SDL_config.h do for SDL_BYTEORDER?
> stbmac:trunk Michael$ port provides /opt/local/include/SDL/SDL_config.h
> /opt/local/include/SDL/SDL_config.h is provided by: libsdl
> stbmac:trunk Michael$ port installed libsdl
> The following ports are currently installed:
> libsdl @1.2.13_6+universal
> libsdl @1.2.14_8+universal (active)
> stbmac:trunk Michael$
> I've got the right version installed and active? Right?
You've got the latest version installed and active, anyway. That could be the "right version" depending on your definition of "right". :)
> stbmac:trunk Michael$ egrep BYTE /opt/local/include/SDL/SDL_config.h
> #define SDL_BYTEORDER 1234
> That can't be right. Can it?
> Well, that's what it has. A single fixed value. No ifdefs, no nothing.
> Looking at SDL_config.h, it doesn't seem that cross compilation /
> +universal would work at all. It seems to be very system dependent.
I would tend to agree with you, this doesn't seem right, and should have a ticket filed for it. I found this ticket:
That's not exactly this issue; that ticket is about the SDL_BYTEORDER being 1234 always, on every system, Intel or PowerPC, whether or not it's building universal. You could add your additional observations there.
> Manually commenting out that hard-coded BYTEORDER line, so that the
> system determines it at compile time? That seems to be a workaround.
Does that happen? I would have expected we'd need to define SDL_BYTEORDER correctly in the config file.
More information about the macports-users