libgpg-error: build error on Solaris 9

Tom G. Christensen tgc at jupiterrise.com
Thu Mar 3 16:13:31 CET 2016


On 03/03/16 08:59, NIIBE Yutaka wrote:
> On 03/03/2016 01:41 AM, Tom G. Christensen wrote:
>> However the makefiles do not actually use the value of LIB_SCHED_YIELD
>> for anything so -lrt is missing at link time.
>
> My badness.  I was looking NPTH library and changed wrongly.  I believe
> that following patch can fix.
>

Yes, that works fine.

Tested on Solaris 9/x86 and Solaris 10/SPARC (32bit & 64bit).

> We also need to change src/gen-posix-lock-obj.c, so that
> USE_DOUBLE_FOR_ALIGNMENT macro is defined 1.
>
> I code:
>
>      #if defined(__solaris__) && !defined (__LP64__) && !defined(_LP64)
>

To detect Solaris you must look for __sun instead of __solaris__.

A reference for pre-defined compiler macros can be found here:
https://sourceforge.net/p/predef/wiki/Home/
It also covers SunOS/Solaris.

> If you can figure out how to fix this, please let us know, too.
> Thanks in advance.
>

I replaced __solaris__ with __sun and now the test passes. Tested on 
Solaris 9/x86 and Solaris 10/SPARC (32bit & 64bit).

<snip patch>

-tgc



More information about the Gnupg-devel mailing list