annotate src/common.h @ 407:24871e6cdd69

Stuart C. Naifeh - fix rfc2231 encoding when saving messages to both .eml and msg formats
author Carl Byington <carl@five-ten-sg.com>
date Sat, 27 Mar 2021 14:53:01 -0700
parents 506e266f930d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
1
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 133
diff changeset
2 #ifndef __PST_COMMON_H
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 133
diff changeset
3 #define __PST_COMMON_H
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
4
123
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
5
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
6 #include <stdlib.h>
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
7 #include <stdio.h>
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
8 #include <stdarg.h>
205
5f3fa53cb0e1 make nested mime multipart/alternative to hold the text/html parts
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
9 #include <time.h>
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
10
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
11
377
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
12 #if !defined(_MSC_VER) || (_MSC_VER >= 1800)
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
13 #include <stdint.h>
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
14 #include <inttypes.h>
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
15 #else
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
16 typedef signed char int8_t;
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
17 typedef unsigned char uint8_t;
377
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
18 typedef unsigned short uint16_t;
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
19 typedef short int16_t;
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
20 typedef unsigned int uint32_t;
377
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
21 typedef int int32_t;
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
22 typedef unsigned long long uint64_t;
506e266f930d Vitaliy Didik - fix MSVC build
Carl Byington <carl@five-ten-sg.com>
parents: 246
diff changeset
23 typedef long long int64_t;
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
24 #endif
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
25
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
26 #ifndef _WIN32
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 133
diff changeset
27 typedef struct {
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 133
diff changeset
28 uint32_t dwLowDateTime;
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 133
diff changeset
29 uint32_t dwHighDateTime;
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
30 } FILETIME;
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
31 // According to Jan Wolter, sys/param.h is the most portable source of endian
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
32 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
33 #include <sys/param.h>
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
34 #else
133
2ec889a79e51 patch from Fridrich Strba, some systems need extra library for regex
Carl Byington <carl@five-ten-sg.com>
parents: 130
diff changeset
35 #include <windows.h>
229
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
36 #endif
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
37
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
38 #if defined(_WIN32) || defined(__DJGPP__)
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
39 #ifndef LITTLE_ENDIAN
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
40 #define LITTLE_ENDIAN 1234
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
41 #endif
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
42 #ifndef BIG_ENDIAN
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
43 #define BIG_ENDIAN 4321
e7f363452178 patch from Fridrich Strba for undefined ENDIAN
Carl Byington <carl@five-ten-sg.com>
parents: 205
diff changeset
44 #endif
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
45 #define BYTE_ORDER LITTLE_ENDIAN
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
46 #endif
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
47
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
48
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
49 #endif
246
5a82d41c883d patches from Kenneth Berland for solaris
Carl Byington <carl@five-ten-sg.com>
parents: 229
diff changeset
50
5a82d41c883d patches from Kenneth Berland for solaris
Carl Byington <carl@five-ten-sg.com>
parents: 229
diff changeset
51 #if defined (__SVR4) && defined (__sun)
5a82d41c883d patches from Kenneth Berland for solaris
Carl Byington <carl@five-ten-sg.com>
parents: 229
diff changeset
52 #define LITTLE_ENDIAN 1234
5a82d41c883d patches from Kenneth Berland for solaris
Carl Byington <carl@five-ten-sg.com>
parents: 229
diff changeset
53 #define BYTE_ORDER LITTLE_ENDIAN
5a82d41c883d patches from Kenneth Berland for solaris
Carl Byington <carl@five-ten-sg.com>
parents: 229
diff changeset
54 #endif