Subject: amd64 and __LP64__
To: None <tech-toolchain@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-toolchain
Date: 11/21/2003 08:33:59
This is regarding PR pkg/23515: graphics/tiff is broken under amd64.

We tracked this down to libtiff was not built for a 64bit. The fix was
simply:

-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__)
+#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(_LP64)

My patches just add "defined(_LP64)" to the files.

It was suggested that I ask tech-toolchain the following:

Does our gcc not define __LP64__ as a preprocessor macro by default
on 64-bit machines?

Is _LP64 in fact the correct macro to check?

I was told we need to be sure before we make this change.

If should ask this on the amd64 port list, please tell me.

   Jeremy C. Reed
   http://bsd.reedmedia.net/