Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib/lib.h @ 50:d493b9cc265e HEAD
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
to be able to handle off_t overflows properly. Also changed a few unsigned
int fields into uoff_t so we should now support >2G mails if uoff_t is
64bit. Also fixed several potential integer overflows.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 27 Aug 2002 22:16:54 +0300 |
parents | 3b1985cbc908 |
children | 62fc6c729962 |
rev | line source |
---|---|
0 | 1 #ifndef __LIB_H |
2 #define __LIB_H | |
3 | |
4 /* default system includes - keep these at minimum.. */ | |
5 #include <string.h> /* strcmp() etc. */ | |
6 #include <stdarg.h> /* va_list is used everywhere */ | |
7 #include <errno.h> /* error checking is good */ | |
8 #include <sys/types.h> /* many other includes want this */ | |
9 | |
10 typedef struct _IOLoop *IOLoop; | |
11 typedef struct _IO *IO; | |
12 typedef struct _Timeout *Timeout; | |
13 | |
14 typedef struct _IPADDR IPADDR; | |
15 typedef struct _IOBuffer IOBuffer; | |
16 typedef struct _TempString TempString; | |
17 | |
18 /* default lib includes */ | |
19 #ifdef HAVE_CONFIG_H | |
20 # include "../../config.h" | |
21 #endif | |
50
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
22 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
23 #if defined (UOFF_T_INT) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
24 typedef unsigned int uoff_t; |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
25 #elif defined (UOFF_T_LONG) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
26 typedef unsigned long uoff_t; |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
27 #elif defined (UOFF_T_LONG_LONG) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
28 typedef unsigned long long uoff_t; |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
29 #else |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
30 # error uoff_t size not set |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
31 #endif |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
32 |
0 | 33 #include "compat.h" |
34 #include "macros.h" | |
35 #include "failures.h" | |
36 | |
37 #include "mempool.h" | |
38 #include "temp-mempool.h" | |
39 #include "imem.h" | |
40 | |
41 #include "strfuncs.h" | |
42 | |
43 unsigned int nearest_power(unsigned int num); | |
44 | |
45 void lib_init(void); | |
46 void lib_deinit(void); | |
47 | |
48 #endif |