[OpenAFS-devel] Where to put new header file

Ben Huntsman ben@huntsmans.net
Mon, 30 Jan 2023 23:33:46 +0000


--_000_MWHPR0701MB36740414DC3C84196BBA8212A7D39MWHPR0701MB3674_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there-
   I'm working on getting OpenAFS running on AIX 7.3, but have run into an =
interesting problem and could use a bit of guidance.

   src/rx/AIX/rx_knet.c includes <net/netisr.h>.  However, on AIX 7.3 IBM a=
dded an include to <sys/libsysp.h> which they don't ship (it's not listed i=
n bos.content_list).  Here's the relevant section:

...
#ifdef  _KERNEL

#ifdef  _AIX_FULLOSF
#include "kern/queue.h"
#include "kern/thread.h"
#include "kern/sched_prim.h"
#else
#define EVENT_NETISR    0x0726
#include <sys/libsysp.h>        /* remque/insque */
#endif
...

   The only difference from earlier versions of AIX is the #include <sys/li=
bsysp.h>.  As you can see, there's no real way to use macros to escape from=
 it.  However, we don't really need anything in it for OpenAFS, so my propo=
sal would be to just create an empty sys/libsysp.h file within the OpenAFS =
source tree.  It would only be picked up by AIX 7.3 builds.  I tested this =
and it allows the compile to continue.  The question though is, where in th=
e tree should such file live?

   I would also welcome alternative suggestions.

Thank you much!

-Ben



--_000_MWHPR0701MB36740414DC3C84196BBA8212A7D39MWHPR0701MB3674_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
Hi there-</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
&nbsp; &nbsp;I'm working on getting OpenAFS running on AIX 7.3, but have ru=
n into an interesting problem and could use a bit of guidance.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
&nbsp; &nbsp;src/rx/AIX/rx_knet.c includes &lt;net/netisr.h&gt;.&nbsp; Howe=
ver, on AIX 7.3 IBM added an include to &lt;sys/libsysp.h&gt; which they do=
n't ship (it's not listed in bos.content_list).&nbsp; Here's the relevant s=
ection:</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
...</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
#ifdef &nbsp;_KERNEL
<div><br class=3D"ContentPasted0">
</div>
<div class=3D"ContentPasted0">#ifdef &nbsp;_AIX_FULLOSF</div>
<div class=3D"ContentPasted0">#include &quot;kern/queue.h&quot;</div>
<div class=3D"ContentPasted0">#include &quot;kern/thread.h&quot;</div>
<div class=3D"ContentPasted0">#include &quot;kern/sched_prim.h&quot;</div>
<div class=3D"ContentPasted0">#else</div>
<div class=3D"ContentPasted0">#define EVENT_NETISR &nbsp; &nbsp;0x0726</div=
>
<div class=3D"ContentPasted0">#include &lt;sys/libsysp.h&gt; &nbsp; &nbsp; =
&nbsp; &nbsp;/* remque/insque */</div>
<div class=3D"ContentPasted0">#endif</div>
...</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
&nbsp; &nbsp;The only difference from earlier versions of AIX is the #inclu=
de &lt;sys/libsysp.h&gt;.&nbsp; As you can see, there's no real way to use =
macros to escape from it.&nbsp; However, we don't really need anything in i=
t for OpenAFS, so my proposal would be to just create an empty
 sys/libsysp.h file within the OpenAFS source tree.&nbsp; It would only be =
picked up by AIX 7.3 builds.&nbsp; I tested this and it allows the compile =
to continue.&nbsp; The question though is, where in the tree should such fi=
le live?</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
&nbsp; &nbsp;I would also welcome alternative suggestions.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
Thank you much!<br>
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
-Ben</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
</body>
</html>

--_000_MWHPR0701MB36740414DC3C84196BBA8212A7D39MWHPR0701MB3674_--