Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib/lib.h @ 9451:9fff30644260 HEAD
istream-concat: Fixed a lot of bugs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 26 Oct 2009 17:06:57 -0400 |
parents | 81806d402514 |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
4744
diff
changeset
|
1 #ifndef LIB_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
4744
diff
changeset
|
2 #define LIB_H |
0 | 3 |
57
2d2e2594e60f
config.h should be included first.
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
4 /* default lib includes */ |
2d2e2594e60f
config.h should be included first.
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
5 #ifdef HAVE_CONFIG_H |
3476
bb88b67d72b2
Include just "config.h", not "../../config.h". The absolute path breaks
Timo Sirainen <tss@iki.fi>
parents:
3470
diff
changeset
|
6 # include "config.h" |
57
2d2e2594e60f
config.h should be included first.
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
7 #endif |
2d2e2594e60f
config.h should be included first.
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
8 |
0 | 9 /* default system includes - keep these at minimum.. */ |
4744
757f5dce4f21
Include stddef.h always to make NULL expand correctly in Solaris.
Timo Sirainen <tss@iki.fi>
parents:
4451
diff
changeset
|
10 #include <stddef.h> /* Solaris defines NULL wrong unless this is used */ |
0 | 11 #include <string.h> /* strcmp() etc. */ |
1989
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
12 #ifdef HAVE_STRINGS_H |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
13 # include <strings.h> /* strcasecmp() etc. */ |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
14 #endif |
0 | 15 #include <stdarg.h> /* va_list is used everywhere */ |
56 | 16 #include <limits.h> /* INT_MAX, etc. */ |
0 | 17 #include <errno.h> /* error checking is good */ |
18 #include <sys/types.h> /* many other includes want this */ | |
19 | |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
20 #ifdef HAVE_STDINT_H |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
21 # include <stdint.h> /* C99 int types, we mostly need uintmax_t */ |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
22 #endif |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
23 |
0 | 24 #include "compat.h" |
25 #include "macros.h" | |
26 #include "failures.h" | |
27 | |
399
383503837741
s/temporary memory pool/data stack/ which is the correct name for it.
Timo Sirainen <tss@iki.fi>
parents:
187
diff
changeset
|
28 #include "data-stack.h" |
0 | 29 #include "mempool.h" |
30 #include "imem.h" | |
31 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
32 typedef struct buffer buffer_t; |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
33 typedef struct buffer string_t; |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
34 |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
35 struct istream; |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
36 struct ostream; |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
833
diff
changeset
|
37 |
3470
346a494c2feb
Moved array declaration to array-decl.h and include it in lib.h. So array.h
Timo Sirainen <tss@iki.fi>
parents:
3190
diff
changeset
|
38 #include "array-decl.h" /* ARRAY_DEFINE()s may exist in any header */ |
3190
ba17b6e45193
Added dynamic array implementation. When compiling with gcc and DEBUG
Timo Sirainen <tss@iki.fi>
parents:
3188
diff
changeset
|
39 #include "strfuncs.h" |
ba17b6e45193
Added dynamic array implementation. When compiling with gcc and DEBUG
Timo Sirainen <tss@iki.fi>
parents:
3188
diff
changeset
|
40 |
7912
81806d402514
Added more consts, ATTR_CONSTs and ATTR_PUREs.
Timo Sirainen <tss@iki.fi>
parents:
6410
diff
changeset
|
41 size_t nearest_power(size_t num) ATTR_CONST; |
0 | 42 |
43 void lib_init(void); | |
44 void lib_deinit(void); | |
45 | |
46 #endif |