Saturday, February 01, 2025

Re: work around alephone and openal conflict

On 2025/02/01 12:10, Theo Buehler wrote:
> The below is a hack that ensures that the prototype with effects
> parameter is in scope before the effects macro is defined fixing the
> build of the entire marathon suite.

very nice that you found a single place to work around this.

> openal should really avoid using variable names in prototypes (or prefix
> them with _) and effects.h should use better names for its macros.

+1

ok

> Index: patches/patch-Source_Files_GameWorld_effects_h
> ===================================================================
> RCS file: patches/patch-Source_Files_GameWorld_effects_h
> diff -N patches/patch-Source_Files_GameWorld_effects_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-Source_Files_GameWorld_effects_h 1 Feb 2025 11:06:27 -0000
> @@ -0,0 +1,18 @@
> +alext.h has variable names in prototypes (which is a pollution that is
> +best avoided even if it hurts readability) and this clashes with the
> +effects macro, which is an incredibly short/bad name for a macro in a
> +header.
> +
> +Index: Source_Files/GameWorld/effects.h
> +--- Source_Files/GameWorld/effects.h.orig
> ++++ Source_Files/GameWorld/effects.h
> +@@ -40,6 +40,9 @@ Aug 30, 2000 (Loren Petrich):
> + Added stuff for unpacking and packing
> + */
> +
> ++// XXX - avoid conflict between effects macro and variable names in prototypes
> ++#include <AL/alext.h>
> ++
> + // LP addition:
> + #include "dynamic_limits.h"
> +
>

No comments:

Post a Comment