Subject: Re: CVS commit: pkgsrc/graphics/cairo
To: grant beattie <grant@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-changes
Date: 11/03/2005 02:32:40
grant beattie wrote:
> ah, this is in fact a different problem. graphics/glitz is incorrectly
> using __sun__ in an #if to #define away the *f math functions on
> platforms where they are known to not be generally available.
> 
> changing this to __sun (like it is in the rest of the glitz code)
> fixes the problem, and cairo builds correctly without libsunmath, as
> it should.

There may be other problems, depending on how the preprocessor is 
invoked. This is the result from a system with the following:

- Sun C 5.7 2005/01/07
- gcc 4.0.1
- /usr/lib/cpp: Software Generation Utilities (SGU) SunOS/SVR4

$ cat >foo.c
sun
__sun
sun__
__sun__

$ cc -E foo.c
# 1 "foo.c"
  1
  1
sun__
__sun__
#ident "acomp: Sun C 5.7 2005/01/07"

$ gcc -E foo.c
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.c"
1
1
sun__
1

$ /usr/lib/cpp foo.c
# 1 "foo.c"
1
__sun
sun__
__sun__


(This may be the first start towards the "pkgsrc guide to writing 
portable software" book. ;))

Roland