FYI

-------- P?vodn? zpr?va --------
P?edm?t: HEADS UP -- AF_LOCAL and friends now defined in <sys/socket.h>
Datum: Thu, 30 Oct 2008 00:18:40 -0400
Od: Dan McDonald <danmcd at sun.com>
Spole?nost: Sun Microsystems, Inc. - Solaris Networking & Security
Komu: onnv-gate at onnv.eng.sun.com, on-all at sun.com

Hello gatelings!

The seemingly simple change of adding AF_LOCAL (as well as PF_LOCAL, AF_FILE,
and PF_FILE) to be an alias of AF_UNIX may cause interesting consequences for
people who compile open-source packages.

There are more than a few open-source packages that refuse to say "AF_UNIX"
anywhere in their code (probably for religious reasons) and therefore have
blocks of unused code like this:

        #ifdef AF_LOCAL
                struct sockaddr_un sun;  /* KEBE SAYS watch out! */

                sun.sun_family = AF_LOCAL;
                ....

        #endif

Notice where KEBE spoke up.  Sometimes when we compile code with the right
flags, "sun" is defined to be '1', because there are blocks of code out there
with:

        #ifdef sun
                /* Do Solaris/Sun-specific things... */

        #endif

So if you see variables in now-compiling blocks named "sun", you may wish to
change them to something else.  I delayed putting this back so OpenSolaris
2008.11 wouldn't have any surprises for open-source developers or builders.

So be aware that with this putback, some of your dormant open-source code
will start compiling, and sometimes with unintended consequences.

Thanks!
Dan McD.

p.s. If someone could forward this to X, SFW, and JDS folks, I'd really
      appreciate it.

-- 
Zdenek Kotala              Sun Microsystems
Prague, Czech Republic     http://sun.com/postgresql


Reply via email to