Bug#747274: slashem: various bugs due to LINUX not being defined
Vincent Cheng
vcheng at debian.org
Mon May 12 07:37:38 UTC 2014
On Tue, May 6, 2014 at 7:22 PM, Matt Day <fjarlq at gmail.com> wrote:
> Package: slashem
> Version: 0.0.7E7F3-6
> Severity: important
> Tags: patch
>
> Dear Maintainer,
>
> I upgraded slashem from 0.0.7E7F3-3 to 0.0.7E7F3-6 and discovered the
> game would no longer find my saved-game file. I investigated and found it
> trying to use a truncated saved-game filename, and that the truncation
> was being performed by the regularize() function in sys/unix/unixunix.c,
> because LINUX is not getting #defined as it should.
>
> Turns out this is due to a typo in debian/patches/slashem-debian.patch:
> -/* #define LINUX */
> +#if defined(LINUX)
> +#define LINUX
> +#endif
>
> Obviously the ! operator is missing. See the attached patch.
>
> The slashem source code checks the LINUX define in a few places to
> customize its behavior, so I expect there are a few other weird bugs.
> With this patch, slashem was able to find my save file once again.
Whoops...my bad, it should be #if defined(__linux__) instead of #if
defined(LINUX). Stupid macros...
!defined(...) is incorrect for Debian because slashem also gets built
for Debian kfreebsd and hurd, and on those platforms LINUX should
obviously not be defined.
I'll fix this for the next slashem upload, thanks!
Regards,
Vincent
More information about the Pkg-games-devel
mailing list