Mercurial > libpst
changeset 122:bdb38b434c0a
more changes from Fridrich Strba to avoid installing our config.h
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 02 Feb 2009 21:55:48 -0800 |
parents | 8399ef94c11b |
children | ab2a11e72250 |
files | ChangeLog Makefile.am configure.in libpst.spec.in libpst/Makefile.am libpst/config.h src/Makefile.am src/common.h src/debug.c src/define.h src/dumpblocks.c src/getidblock.c src/libpst.c src/libpst.h src/lspst.c src/lzfu.c src/pst2ldif.cpp src/readpst.c src/readpstlog.c src/timeconv.c xml/libpst.in |
diffstat | 21 files changed, 110 insertions(+), 104 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Feb 01 19:21:47 2009 -0800 +++ b/ChangeLog Mon Feb 02 21:55:48 2009 -0800 @@ -1,4 +1,4 @@ -LibPST 0.6.26 (2009-02-01) +LibPST 0.6.26 (2009-02-02) =============================== * patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
--- a/Makefile.am Sun Feb 01 19:21:47 2009 -0800 +++ b/Makefile.am Mon Feb 02 21:55:48 2009 -0800 @@ -1,14 +1,11 @@ -SUBDIRS = src man html info debian libpst +SUBDIRS = src man html info debian htmldir = ${datadir}/doc/@PACKAGE@-@VERSION@ html_DATA = AUTHORS COPYING ChangeLog NEWS README CLEANFILES = xml/libpst xml/Makefile -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libpst.pc - EXTRA_DIST = Doxyfile libpst.html.tar.gz libpst.spec $(wildcard xml/M*) $(wildcard xml/h*) $(wildcard xml/lib*) if !STATIC_TOOLS - libpstincludedir = $(includedir)/libpst - libpstinclude_HEADERS = config.h + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libpst.pc endif
--- a/configure.in Sun Feb 01 19:21:47 2009 -0800 +++ b/configure.in Mon Feb 02 21:55:48 2009 -0800 @@ -13,10 +13,6 @@ *-mingw*) os_win32=yes ;; - *cygwin*) - os_win32=yes - enable_dii=no # cygwin would find windir/system32/convert, not image magick convert - ;; *) os_win32=no ;; @@ -24,6 +20,19 @@ AC_MSG_RESULT($os_win32) AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"]) +# Check for Win32 platform +AC_MSG_CHECKING([for Win32 platform in general]) +case "$host" in + *-cygwin*) + platform_win32=yes + ;; + *) + platform_win32=$os_win32 + ;; +esac +AC_MSG_RESULT($platform_win32) +AM_CONDITIONAL(PLATFORM_WIN32, [test "$platform_win32" = "yes"]) + # Checks for programs. # The following lines adds the --enable-dii option to configure: @@ -241,7 +250,6 @@ info/Makefile \ libpst.pc \ libpst.spec \ - libpst/Makefile \ man/Makefile \ src/Makefile \ src/pst2dii.cpp \
--- a/libpst.spec.in Sun Feb 01 19:21:47 2009 -0800 +++ b/libpst.spec.in Mon Feb 02 21:55:48 2009 -0800 @@ -47,7 +47,7 @@ %changelog -* Sun Feb 01 2009 Carl Byington <carl@five-ten-sg.com> - 0.6.26-1 +* Mon Feb 02 2009 Carl Byington <carl@five-ten-sg.com> - 0.6.26-1 - patch from Fridrich Strba for building on mingw and general - cleanup of autoconf files - add processing for pst files of type 0x0f
--- a/libpst/Makefile.am Sun Feb 01 19:21:47 2009 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -EXTRA_DIST = config.h
--- a/libpst/config.h Sun Feb 01 19:21:47 2009 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -// -// this file only exists to allow including <libpst/config.h> -// while building this package. The real config.h is at the -// top level, generated by ./configure, and installed into -// $includepath/libpst - -#include "../config.h" -
--- a/src/Makefile.am Sun Feb 01 19:21:47 2009 -0800 +++ b/src/Makefile.am Mon Feb 02 21:55:48 2009 -0800 @@ -1,13 +1,15 @@ -if OS_WIN32 - ICONVLIB = -liconv +if PLATFORM_WIN32 + ICONVLIB = -liconv + NO_UNDEFINED = -no-undefined else - ICONVLIB = + ICONVLIB = + NO_UNDEFINED = endif if STATIC_TOOLS - PSTLIB=@PST_OBJDIR@/libpst.a + PSTLIB = @PST_OBJDIR@/libpst.a else - PSTLIB=libpst.la + PSTLIB = libpst.la endif common_header = common.h \ @@ -27,6 +29,7 @@ if NEED_XGETOPT common_source += XGetopt.c + common_header += XGetopt.h endif noinst_PROGRAMS = deltasearch dumpblocks getidblock @@ -59,12 +62,11 @@ libpstincludedir = $(includedir)/libpst libpstinclude_HEADERS = \ common.h \ - define.h \ libpst.h \ libstrfunc.h\ timeconv.h \ vbuf.h - libpst_la_LDFLAGS = -no-undefined -version-info 1:0:0 + libpst_la_LDFLAGS = $(NO_UNDEFINED) -version-info 1:0:0 endif libpst_la_SOURCES = $(common_source) $(common_header) @@ -72,6 +74,9 @@ EXTRA_DIST = testdebug.c +if !NEED_XGETOPT + EXTRA_DIST += XGetopt.c XGetopt.h +endif # set the include path found by configure INCLUDES= -I$(srcdir)/.. $(all_includes)
--- a/src/common.h Sun Feb 01 19:21:47 2009 -0800 +++ b/src/common.h Mon Feb 02 21:55:48 2009 -0800 @@ -2,22 +2,41 @@ #ifndef __COMMON_H #define __COMMON_H +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> + + +#ifndef _MSC_VER + #include <stdint.h> + #include <inttypes.h> +#else + typedef signed char int8_t; + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef short int16_t; + typedef unsigned int uint32_t; + typedef int int32_t; + typedef unsigned long long uint64_t; + typedef long long int64_t; +#endif + + #ifndef _WIN32 typedef uint32_t DWORD; typedef uint16_t WORD; typedef uint8_t BYTE; typedef uint32_t UINT32; - -# pragma pack (1) - -#ifndef FILETIME_DEFINED - #define FILETIME_DEFINED - /*Win32 Filetime struct - copied from WINE*/ - typedef struct { + typedef struct { // copied from wine DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME; -#endif // FILETIME_DEFINED + // According to Jan Wolter, sys/param.h is the most portable source of endian + // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html + #include <sys/param.h> +#else + #define BYTE_ORDER LITTLE_ENDIAN +#endif -#endif // _WIN32 -#endif // __COMMON_H + +#endif
--- a/src/debug.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/debug.c Mon Feb 02 21:55:48 2009 -0800 @@ -1,6 +1,5 @@ - +#include "common.h" #include "define.h" -//#include <stdint.h> struct pst_debug_item { int type;
--- a/src/define.h Sun Feb 01 19:21:47 2009 -0800 +++ b/src/define.h Mon Feb 02 21:55:48 2009 -0800 @@ -9,7 +9,7 @@ #define DEFINEH_H #ifdef HAVE_CONFIG_H - #include <libpst/config.h> + #include "config.h" #endif #ifdef _WIN32 @@ -45,18 +45,6 @@ #define DEBUG_FUNCRET_NO 10 #define DEBUG_HEXDUMP_NO 11 -#ifdef HAVE_STDIO_H - #include <stdio.h> -#endif - -#ifdef HAVE_STDLIB_H - #include <stdlib.h> -#endif - -#ifdef HAVE_STDARG_H - #include <stdarg.h> -#endif - #ifdef HAVE_TIME_H #include <time.h> #endif @@ -93,7 +81,7 @@ #define D_MKDIR(x) mkdir(x) #define chdir _chdir - + #define strcasecmp _stricmp #define vsnprintf _vsnprintf #define snprintf _snprintf #ifdef _MSC_VER @@ -105,19 +93,10 @@ #else #error Only MSC and mingw supported for Windows #endif - #define strcasecmp _stricmp #ifndef __MINGW32__ #define off_t __int64 #define size_t __int64 #endif - #define int64_t __int64 - #define uint64_t unsigned __int64 - #define int32_t __int32 - #define uint32_t unsigned int - #define int16_t short int - #define uint16_t unsigned short int - #define int8_t signed char - #define uint8_t unsigned char #ifndef UINT64_MAX #define UINT64_MAX ((uint64_t)0xffffffffffffffff) #endif @@ -133,12 +112,6 @@ #include <windows.h> #else - #ifdef HAVE_STDINT_H - #include <stdint.h> - #endif - #ifdef HAVE_INTTYPES_H - #include <inttypes.h> - #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #define D_MKDIR(x) mkdir(x, PERM_DIRS)
--- a/src/dumpblocks.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/dumpblocks.c Mon Feb 02 21:55:48 2009 -0800 @@ -1,8 +1,10 @@ -#include "define.h" #include "common.h" #include "libpst.h" +#include "define.h" + #define OUT_BUF 20 + int main(int argc, char* const* argv) { pst_file pstfile;
--- a/src/getidblock.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/getidblock.c Mon Feb 02 21:55:48 2009 -0800 @@ -1,7 +1,8 @@ + +#include "common.h" +#include "libpst.h" #include "define.h" -#include "common.h" -#include "libpst.h" static void usage();
--- a/src/libpst.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/libpst.c Mon Feb 02 21:55:48 2009 -0800 @@ -5,19 +5,21 @@ * dave.s@earthcorp.com */ -#include "define.h" #include "common.h" #include "libpst.h" #include "timeconv.h" #include "libstrfunc.h" #include "vbuf.h" +#include "define.h" + #define ASSERT(x) { if(!(x)) raise( SIGSEGV ); } #define INDEX_TYPE32 0x0E #define INDEX_TYPE32A 0x0F // unknown, but assumed to be similar for now #define INDEX_TYPE64 0x17 +#define INDEX_TYPE64A 0x15 // http://sourceforge.net/projects/libpff/ #define INDEX_TYPE_OFFSET (off_t)0x0A #define FILE_SIZE_POINTER32 (off_t)0xA8 @@ -203,6 +205,7 @@ pf->do_read64 = 0; break; case INDEX_TYPE64 : + case INDEX_TYPE64A : pf->do_read64 = 1; break; default:
--- a/src/libpst.h Sun Feb 01 19:21:47 2009 -0800 +++ b/src/libpst.h Mon Feb 02 21:55:48 2009 -0800 @@ -10,15 +10,6 @@ #ifndef LIBPST_H #define LIBPST_H -// According to Jan Wolter, sys/param.h is the most portable source of endian -// information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html -#ifdef _WIN32 - #define BYTE_ORDER LITTLE_ENDIAN -#else - #ifdef HAVE_SYS_PARAM_H - #include <sys/param.h> - #endif -#endif // defined _WIN32 #if BYTE_ORDER == BIG_ENDIAN # define LE64_CPU(x) \
--- a/src/lspst.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/lspst.c Mon Feb 02 21:55:48 2009 -0800 @@ -6,11 +6,12 @@ * */ -#include "define.h" #include "common.h" #include "libpst.h" #include "timeconv.h" +#include "define.h" + struct file_ll { char *dname; int32_t stored_count;
--- a/src/lzfu.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/lzfu.c Mon Feb 02 21:55:48 2009 -0800 @@ -9,9 +9,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include "define.h" #include "common.h" #include "libpst.h" + +#include "define.h" #include "lzfu.h" #ifdef HAVE_SYS_TYPES_H
--- a/src/pst2ldif.cpp Sun Feb 01 19:21:47 2009 -0800 +++ b/src/pst2ldif.cpp Mon Feb 02 21:55:48 2009 -0800 @@ -16,13 +16,14 @@ #include <string> extern "C" { - #include "define.h" #include "common.h" #include "libpst.h" #include "timeconv.h" - #include "lzfu.h" #include "libstrfunc.h" #include "vbuf.h" + + #include "define.h" + #include "lzfu.h" } void usage(void);
--- a/src/readpst.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/readpst.c Mon Feb 02 21:55:48 2009 -0800 @@ -4,14 +4,15 @@ * Written by David Smith * dave.s@earthcorp.com */ -#include "define.h" #include "common.h" #include "libpst.h" #include "timeconv.h" -#include "lzfu.h" #include "libstrfunc.h" #include "vbuf.h" +#include "define.h" +#include "lzfu.h" + #ifdef HAVE_REGEX_H #include <regex.h> #endif
--- a/src/readpstlog.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/readpstlog.c Mon Feb 02 21:55:48 2009 -0800 @@ -1,3 +1,6 @@ + +#include "common.h" + #include "define.h" #define BUF_SIZE 4096
--- a/src/timeconv.c Sun Feb 01 19:21:47 2009 -0800 +++ b/src/timeconv.c Mon Feb 02 21:55:48 2009 -0800 @@ -14,10 +14,12 @@ #ifndef _WIN32 #include <time.h> -#include "define.h" + #include "common.h" #include "timeconv.h" +#include "define.h" + char * fileTimeToAscii (const FILETIME *filetime) { time_t t1;
--- a/xml/libpst.in Sun Feb 01 19:21:47 2009 -0800 +++ b/xml/libpst.in Mon Feb 02 21:55:48 2009 -0800 @@ -23,12 +23,17 @@ for import to an LDAP server. </para> + <para>The <ulink + url="http://sourceforge.net/projects/libpff/">libpff</ulink> project + has some excellent documentation of the pst file format. + </para> + </partintro> <refentry id="readpst.1"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -228,7 +233,7 @@ <refentry id="lspst.1"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -331,7 +336,7 @@ <refentry id="readpstlog.1"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -515,7 +520,7 @@ <refentry id="pst2ldif.1"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -691,7 +696,7 @@ <refentry id="pst2dii.1"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -825,7 +830,7 @@ <refentry id="pst.5"> <refentryinfo> - <date>2009-01-25</date> + <date>2009-02-01</date> </refentryinfo> <refmeta> @@ -905,14 +910,17 @@ 00bc offsetIndex2 [4 bytes] 0x0c7e00 in this case ]]></literallayout> <para> - We only support index types 0x0e, 0x0f, and 0x17, and encryption types - 0x00, 0x01 and 0x02. Index type 0x0e is the older 32 bit Outlook format. - Index type 0x0f seems to be rare, and so far the data seems to be - identical to that in type 0x0e files. - Index type 0x17 is the newer 64 bit Outlook format. Encryption - type 0x00 is no encryption, type 0x01 is "compressible" encryption - which is a simple substitution cipher, and type 0x02 is "strong" - encryption, which is a simple three rotor Enigma cipher from WWII. + We only support index types 0x0e, 0x0f, 0x15, and 0x17, and encryption + types 0x00, 0x01 and 0x02. Index type 0x0e is the older 32 bit Outlook + format. Index type 0x0f seems to be rare, and so far the data seems + to be identical to that in type 0x0e files. Index type 0x17 is the + newer 64 bit Outlook format. Index type 0x15 seems to be rare, and + according to the libpff project should have the same format as type + 0x17 files. It was found in a 64-bit pst file created by Visual + Recovery. Encryption type 0x00 is no encryption, type 0x01 is + "compressible" encryption which is a simple substitution cipher, and + type 0x02 is "strong" encryption, which is a simple three rotor Enigma + cipher from WWII. </para> <para> offsetIndex1 is the file offset of the root of the