xref: /freebsd/contrib/sendmail/libsm/gen.html (revision ee7b0571c2c18bdec848ed2044223cc88db29bd8)
140266059SGregory Neil Shapiro<html>
240266059SGregory Neil Shapiro<head>
340266059SGregory Neil Shapiro    <title>libsm : General Definitions</title>
440266059SGregory Neil Shapiro</head>
540266059SGregory Neil Shapiro<body>
640266059SGregory Neil Shapiro
740266059SGregory Neil Shapiro<a href="index.html">Back to libsm overview</a>
840266059SGregory Neil Shapiro
940266059SGregory Neil Shapiro<center>
1040266059SGregory Neil Shapiro    <h1> libsm : General Definitions </h1>
11*4313cc83SGregory Neil Shapiro    <br> $Id: gen.html,v 1.5 2000-12-08 21:41:42 ca Exp $
1240266059SGregory Neil Shapiro</center>
1340266059SGregory Neil Shapiro
1440266059SGregory Neil Shapiro<h2> Introduction </h2>
1540266059SGregory Neil Shapiro
1640266059SGregory Neil ShapiroThe header file <tt>&lt;sm/gen.h&gt;</tt>
1740266059SGregory Neil Shapirocontains general definitions that are used by every other
1840266059SGregory Neil Shapiroheader file in <b>libsm</b>.
1940266059SGregory Neil Shapiro
2040266059SGregory Neil Shapiro<h2> Synopsis </h2>
2140266059SGregory Neil Shapiro
2240266059SGregory Neil Shapiro<pre>
2340266059SGregory Neil Shapiro#include &lt;sm/gen.h&gt;
2440266059SGregory Neil Shapiro
2540266059SGregory Neil Shapiro#define NULL		((void*)0)
2640266059SGregory Neil Shapiro
2740266059SGregory Neil Shapirotypedef int bool;
2840266059SGregory Neil Shapiro#define false	0
2940266059SGregory Neil Shapiro#define true	1
3040266059SGregory Neil Shapiro
3140266059SGregory Neil Shapiro#define SM_MAX(a, b)	((a) &gt; (b) ? (a) : (b))
3240266059SGregory Neil Shapiro#define SM_MIN(a, b)	((a) &lt; (b) ? (a) : (b))
3340266059SGregory Neil Shapiro
3440266059SGregory Neil Shapiro/*
3540266059SGregory Neil Shapiro**  The following types can be accessed and updated atomically.
3640266059SGregory Neil Shapiro**  This is relevant in the context of signal handlers and threads.
3740266059SGregory Neil Shapiro*/
3840266059SGregory Neil Shapirotypedef <i>some signed integral type</i> SM_ATOMIC_INT_T;
3940266059SGregory Neil Shapirotypedef <i>some unsigned integral type</i> SM_ATOMIC_UINT_T;
4040266059SGregory Neil Shapiro</pre>
4140266059SGregory Neil Shapiro
4240266059SGregory Neil Shapiro</body>
4340266059SGregory Neil Shapiro</html>
44