1 | # Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers. |
---|
2 | # All rights reserved. |
---|
3 | # |
---|
4 | # By using this file, you agree to the terms and conditions set |
---|
5 | # forth in the LICENSE file which can be found at the top level of |
---|
6 | # the sendmail distribution. |
---|
7 | # |
---|
8 | # $Id: README,v 1.1.1.1 2003-04-08 15:06:51 zacheiss Exp $ |
---|
9 | # |
---|
10 | |
---|
11 | Libsm is a library of generally useful C abstractions. |
---|
12 | For documentation, see index.html. |
---|
13 | |
---|
14 | Libsm stands alone; it depends on no other sendmail libraries, |
---|
15 | and the only sendmail header files it depends on are its own, |
---|
16 | which reside in ../include/sm. |
---|
17 | |
---|
18 | The t-*.c files are regression tests. |
---|
19 | These tests are incomplete: we do not yet test all of the APIs, |
---|
20 | and we have not yet converted all tests to use the test harness. |
---|
21 | If a test fails read the explanation it generates. Sometimes it |
---|
22 | is sufficient to change a compile time flag, which are also listed |
---|
23 | below. If that does not help, check the sendmail/README files for |
---|
24 | problems on your OS. |
---|
25 | |
---|
26 | The b-*.c files are benchmarks that compare system routines with |
---|
27 | those provided by libsm. By default sendmail uses the routines |
---|
28 | provided by the OS. In several cases, the routines provided by |
---|
29 | libsm are faster than those of the OS. If your OS provides the |
---|
30 | routines, you can compare the performance of them with the libsm |
---|
31 | versions by running the programs with the option -d (by default |
---|
32 | the programs just issue an explanation when/how to use them). |
---|
33 | The programs are: |
---|
34 | |
---|
35 | b-strcmp.c tests strcasecmp(). |
---|
36 | |
---|
37 | +----------------------+ |
---|
38 | | CONFIGURATION MACROS | |
---|
39 | +----------------------+ |
---|
40 | |
---|
41 | Libsm uses a set of C preprocessor macros to specify platform specific |
---|
42 | features of the C compiler and standard C libraries. |
---|
43 | |
---|
44 | If you are porting sendmail to a new platform, you may need to tweak |
---|
45 | the values of some of these macros. |
---|
46 | |
---|
47 | The following macros are given default values in <sm/config.h>. |
---|
48 | If the default value is wrong for a given platform, then a platform |
---|
49 | specific value is specified in one of two ways: |
---|
50 | |
---|
51 | - A -D option is added to the confENVDEF macro; this change can be made |
---|
52 | to the platform M4 file in devtools/OS, or to the site.config.m4 |
---|
53 | file in devtools/Site. |
---|
54 | |
---|
55 | - The confSM_OS_HEADER macro in the platform M4 file defines sm_os_foo, |
---|
56 | which forces "sm/os/sm_os_foo.h" to be included by "sm/config.h" via a |
---|
57 | link that is made from "sm_os.h" to "sm/os/sm_os_foo.h". Platform |
---|
58 | specific configuration macro settings are added to <sm/os/sm_os_foo.h>. |
---|
59 | |
---|
60 | SM_CONF_STDBOOL_H |
---|
61 | Set to 1 if the header file <stdbool.h> exists, |
---|
62 | and defines true, false and bool. |
---|
63 | |
---|
64 | SM_CONF_SYS_CDEFS_H |
---|
65 | Set to 1 if the header file <sys/cdefs.h> exists, |
---|
66 | and defines __P. You may need to do this to eliminate |
---|
67 | warnings about __P being multiply defined. |
---|
68 | |
---|
69 | SM_CONF_STDDEF_H |
---|
70 | Set to 0 if the header file <stddef.h> does not exist. |
---|
71 | |
---|
72 | SM_CONF_SETITIMER |
---|
73 | Set to 0 if the setitimer function is not available. |
---|
74 | |
---|
75 | SM_CONF_SYSEXITS_H |
---|
76 | Set to 1 if <sysexits.h> exists, and sets the EX_* macros |
---|
77 | to values different from the default BSD values in <sm/sysexits.h>. |
---|
78 | |
---|
79 | SM_CONF_UID_GID |
---|
80 | Set to 0 if <sys/types.h> does not define uid_t and gid_t. |
---|
81 | |
---|
82 | SM_CONF_SSIZE_T |
---|
83 | Set to 0 if <sys/types.h> does not define ssize_t. |
---|
84 | |
---|
85 | SM_CONF_BROKEN_SIZE_T |
---|
86 | Set to 1 if size_t is not unsigned. |
---|
87 | |
---|
88 | SM_CONF_LONGLONG |
---|
89 | Set to 1 if your C compiler supports the 'long long' type. |
---|
90 | This will be set automatically if you use gcc or a C compiler |
---|
91 | that conforms to the 1999 ISO C standard. |
---|
92 | |
---|
93 | SM_CONF_QUAD_T |
---|
94 | Set to 1 if your C compiler does not support 'long long', |
---|
95 | but <sys/types.h> defines quad_t as an integral type. |
---|
96 | |
---|
97 | SM_CONF_SHM |
---|
98 | Set to 1 if System V shared memory APIs are available. |
---|
99 | |
---|
100 | SM_CONF_MSG |
---|
101 | Set to 1 if System V message queues are available. |
---|
102 | |
---|
103 | SM_CONF_SEM |
---|
104 | Set to 1 if semaphores are available. |
---|
105 | |
---|
106 | SM_CONF_BROKEN_STRTOD |
---|
107 | Set to 1 if your strtod() does not work properly. |
---|
108 | |
---|
109 | SM_CONF_GETOPT |
---|
110 | Set to 1 if your operating system does not include getopt(3). |
---|
111 | |
---|
112 | SM_CONF_LDAP_MEMFREE |
---|
113 | Set to 1 if your LDAP client libraries include ldap_memfree(3). |
---|
114 | |
---|
115 | SM_IO_MAX_BUF_FILE |
---|
116 | Set this to a useful buffer size for regular files if stat(2) |
---|
117 | does not return a value for st_blksize that is the |
---|
118 | "optimal blocksize for I/O". |
---|
119 | |
---|
120 | SM_IO_MAX_BUF |
---|
121 | Set this to a useful maximum buffer size for other than |
---|
122 | regular files if stat(2) does not return a value for |
---|
123 | st_blksize that is the "optimal blocksize for I/O". |
---|
124 | |
---|
125 | SM_IO_MIN_BUF |
---|
126 | Set this to a useful minimum buffer size for other than |
---|
127 | regular files if stat(2) does not return a value for |
---|
128 | st_blksize that is the "optimal blocksize for I/O". |
---|
129 | |
---|