xref: /freebsd/contrib/sendmail/libsm/gen.html (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1<html>
2<head>
3    <title>libsm : General Definitions</title>
4</head>
5<body>
6
7<a href="index.html">Back to libsm overview</a>
8
9<center>
10    <h1> libsm : General Definitions </h1>
11    <br> $Id: gen.html,v 1.5 2000-12-08 21:41:42 ca Exp $
12</center>
13
14<h2> Introduction </h2>
15
16The header file <tt>&lt;sm/gen.h&gt;</tt>
17contains general definitions that are used by every other
18header file in <b>libsm</b>.
19
20<h2> Synopsis </h2>
21
22<pre>
23#include &lt;sm/gen.h&gt;
24
25#define NULL		((void*)0)
26
27typedef int bool;
28#define false	0
29#define true	1
30
31#define SM_MAX(a, b)	((a) &gt; (b) ? (a) : (b))
32#define SM_MIN(a, b)	((a) &lt; (b) ? (a) : (b))
33
34/*
35**  The following types can be accessed and updated atomically.
36**  This is relevant in the context of signal handlers and threads.
37*/
38typedef <i>some signed integral type</i> SM_ATOMIC_INT_T;
39typedef <i>some unsigned integral type</i> SM_ATOMIC_UINT_T;
40</pre>
41
42</body>
43</html>
44