[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-tech-pkg
Subject:    Add <sys/sysctl.h> early as possible (upcoming mesa 17.0.0)
From:       David Shao <davshao () gmail ! com>
Date:       2017-01-30 7:14:42
Message-ID: CABZaEK77fX_yEwG_v-ir5d2g-0WLxxdJDRYY4YUSD2aOnEqu1Q () mail ! gmail ! com
[Download RAW message or body]

Reminder: If you are patching a port by adding
#include <sys/sysctl.h>
then add this as soon as possible.  DO NOT under any
circumstances add this after local includes.

The reason is as follows.  NetBSD's version of
sys/sysctl.h includes sys/param.h.  sys.param.h defines
ALIGN as a one-parameter macro.

Suppose you decide to ignore this advice.  One day a
port, let's call it the upcoming mesa 17.0.0 (it's really
13.1.0, the mesa3D people just decided to start versioning
their software by year), will decide to cleverly define
its own version of ALIGN with two arguments.  And this
new version of ALIGN will have a helpful include guard.
But fortunately it undefs ALIGN before it redefines it.

So just include sys/sysctl.h as soon as possible.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic