Browse Source

import from CVS

dvh-chacham15-master
DINH Viet Hoa 10 years ago
commit
9155727e0b
452 changed files with 173962 additions and 0 deletions
  1. +0
    -0
      AUTHORS
  2. +31
    -0
      COPYRIGHT
  3. +5202
    -0
      ChangeLog
  4. +56
    -0
      Makefile.am
  5. +284
    -0
      NEWS
  6. +0
    -0
      README
  7. +94
    -0
      autogen.sh
  8. +26
    -0
      build-mac/Info.plist
  9. +2
    -0
      build-mac/README
  10. +3308
    -0
      build-mac/libetpan.xcodeproj/project.pbxproj
  11. +23
    -0
      build-mac/update.sh
  12. +35
    -0
      build-windows/Makefile.am
  13. +73
    -0
      build-windows/README.txt
  14. +4
    -0
      build-windows/StdAfx.h
  15. +4
    -0
      build-windows/build_headers.bat
  16. +171
    -0
      build-windows/build_headers.list
  17. +86
    -0
      build-windows/libetpan-config.h
  18. +48
    -0
      build-windows/libetpan.sln
  19. +1518
    -0
      build-windows/libetpan/libetpan.vcproj
  20. +53
    -0
      build-windows/libetpan_version.h
  21. +246
    -0
      build-windows/readmsg/readmsg.vcproj
  22. +238
    -0
      build-windows/smtpsend/smtpsend.vcproj
  23. +690
    -0
      configure.ac
  24. +15097
    -0
      doc/API.sgml
  25. +654
    -0
      doc/DOCUMENTATION
  26. +58
    -0
      doc/Makefile.am
  27. +388
    -0
      doc/README.sgml
  28. +54
    -0
      doc/depend.dot
  29. +39
    -0
      doc/layer.fig
  30. +34
    -0
      include/Makefile.am
  31. +40
    -0
      libetpan-config.h.in
  32. +60
    -0
      libetpan-config.in
  33. +1
    -0
      m4/README
  34. +157
    -0
      rules.mk
  35. +85
    -0
      src/Makefile.am
  36. +34
    -0
      src/bsd/Makefile.am
  37. +149
    -0
      src/bsd/getopt.c
  38. +93
    -0
      src/bsd/getopt.h
  39. +651
    -0
      src/bsd/getopt_long.c
  40. +51
    -0
      src/data-types/Makefile.am
  41. +145
    -0
      src/data-types/base64.c
  42. +65
    -0
      src/data-types/base64.h
  43. +162
    -0
      src/data-types/carray.c
  44. +149
    -0
      src/data-types/carray.h
  45. +331
    -0
      src/data-types/charconv.c
  46. +84
    -0
      src/data-types/charconv.h
  47. +414
    -0
      src/data-types/chash.c
  48. +191
    -0
      src/data-types/chash.h
  49. +273
    -0
      src/data-types/clist.c
  50. +146
    -0
      src/data-types/clist.h
  51. +300
    -0
      src/data-types/connect.c
  52. +58
    -0
      src/data-types/connect.h
  53. +94
    -0
      src/data-types/hmac-md5.h
  54. +56
    -0
      src/data-types/mail.h
  55. +500
    -0
      src/data-types/mail_cache_db.c
  56. +158
    -0
      src/data-types/mail_cache_db.h
  57. +52
    -0
      src/data-types/mail_cache_db_types.h
  58. +378
    -0
      src/data-types/maillock.c
  59. +53
    -0
      src/data-types/maillock.h
  60. +73
    -0
      src/data-types/mailsasl.c
  61. +11
    -0
      src/data-types/mailsasl.h
  62. +322
    -0
      src/data-types/mailsem.c
  63. +51
    -0
      src/data-types/mailsem.h
  64. +326
    -0
      src/data-types/mailstream.c
  65. +97
    -0
      src/data-types/mailstream.h
  66. +189
    -0
      src/data-types/mailstream_cancel.c
  67. +15
    -0
      src/data-types/mailstream_cancel.h
  68. +11
    -0
      src/data-types/mailstream_cancel_types.h
  69. +582
    -0
      src/data-types/mailstream_helper.c
  70. +87
    -0
      src/data-types/mailstream_helper.h
  71. +275
    -0
      src/data-types/mailstream_low.c
  72. +88
    -0
      src/data-types/mailstream_low.h
  73. +370
    -0
      src/data-types/mailstream_socket.c
  74. +58
    -0
      src/data-types/mailstream_socket.h
  75. +1166
    -0
      src/data-types/mailstream_ssl.c
  76. +111
    -0
      src/data-types/mailstream_ssl.h
  77. +7
    -0
      src/data-types/mailstream_ssl_private.h
  78. +95
    -0
      src/data-types/mailstream_types.h
  79. +578
    -0
      src/data-types/md5.c
  80. +88
    -0
      src/data-types/md5.h
  81. +80
    -0
      src/data-types/md5global.h
  82. +578
    -0
      src/data-types/mmapstring.c
  83. +158
    -0
      src/data-types/mmapstring.h
  84. +7
    -0
      src/data-types/mmapstring_private.h
  85. +162
    -0
      src/data-types/timeutils.c
  86. +9
    -0
      src/data-types/timeutils.h
  87. +43
    -0
      src/driver/Makefile.am
  88. +9
    -0
      src/driver/TODO
  89. +57
    -0
      src/driver/implementation/Makefile.am
  90. +41
    -0
      src/driver/implementation/data-message/Makefile.am
  91. +134
    -0
      src/driver/implementation/data-message/data_message_driver.c
  92. +52
    -0
      src/driver/implementation/data-message/data_message_driver.h
  93. +50
    -0
      src/driver/implementation/db/Makefile.am
  94. +1071
    -0
      src/driver/implementation/db/dbdriver.c
  95. +53
    -0
      src/driver/implementation/db/dbdriver.h
  96. +316
    -0
      src/driver/implementation/db/dbdriver_message.c
  97. +52
    -0
      src/driver/implementation/db/dbdriver_message.h
  98. +71
    -0
      src/driver/implementation/db/dbdriver_types.h
  99. +149
    -0
      src/driver/implementation/db/dbstorage.c
  100. +62
    -0
      src/driver/implementation/db/dbstorage.h

+ 0
- 0
AUTHORS View File


+ 31
- 0
COPYRIGHT View File

@ -0,0 +1,31 @@
libEtPan! -- a mail stuff library
Copyright (C) 2001 - 2005 - DINH Viet Hoa
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the libEtPan! project nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This project contains code from sendmail, NetBSD,
RSA Data Security MD5 Message-Digest Algorithm, Cyrus IMAP.

+ 5202
- 0
ChangeLog
File diff suppressed because it is too large
View File


+ 56
- 0
Makefile.am View File

@ -0,0 +1,56 @@
# libEtPan! -- a mail stuff library
#
# Copyright (C) 2007 g10 Code GmbH
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the libEtPan! project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
include $(top_srcdir)/rules.mk
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = libetpan-config.in libetpan-config.h.in COPYRIGHT
bin_SCRIPTS = libetpan-config
# The file stamp-prepare is generated in the top build directory by
# rules defined in rules.mk.
CLEANFILES = stamp-prepare libetpan-config.h
DISTCLEANFILES = libetpan-config
SUBDIRS = build-windows include src tests doc
BUILT_SOURCES += libetpan-config.h
etpaninclude_HEADERS = libetpan-config.h
# We need to build the header file before the link farm for VPATH
# builds.
$(top_builddir)/stamp-prepare: libetpan-config.h
libetpan-config.h: libetpan-config.h.in config.h
cat $(srcdir)/libetpan-config.h.in | $(CPP) -I$(top_builddir) - \
| sed -e '/^#/d;/^[ \t]*$$/d;s/^@/#/' > $@

+ 284
- 0
NEWS View File

@ -0,0 +1,284 @@
2006-03-22 - libetpan-0.45
* release 0.45 - Depth Charge
bugfix release
2006-03-08 - libetpan-0.43
* release 0.43 - Lateralus
bugfix release
2006-01-09 - libetpan-0.42
* release 0.41 - Figure Number Five
bugfix release
2005-12-02 - libetpan-0.41
* release 0.41 - Transfixion
* passphrase is implemented for S/MIME and PGP.
* avoid symbols conflict between GnuTLS and OpenSSL.
2005-10-07 - libetpan-0.40 - hoa
* release 0.40 - Kashmir
* SSL initialization is optional.
2005-09-16 - libetpan-0.39 - hoa
* release 0.39 - Deliverance
* compatibility with GnuTLS
* SASL for higher level
2005-07-20 - libetpan-0.38 - hoa
* release 0.38 - Deadwing
* fixed SSL
* IMAP improvements
* SASL
2005-07-03 - libetpan-0.37 - hoa
* release 0.37 - Deadwing
* windows port
* fixed IMAP implementation (for sylpheed)
2005-02-22 - libetpan-0.36 - hoa
* release 0.36 - Silver Drop
* memory leak
* fixed maildir support
2004-12-28 - libetpan-0.35 - hoa
libEtPan! - a mail library
* release 0.35 - Dimebag Darrell
* minor bugfixes.
2004-11-04 - libetpan-0.34 - hoa
libEtPan! - a mail library
* release 0.34 - edge
* general
- support for debian systems mbox
- ability to disable thread-safe support
2004-08-24 - libetpan-0.33 - hoa
libEtPan! - a mail library
* release 0.33 - entropia
* general
- bugfixes in IMAP module and mailstream
- fixed low-level data structures
- better support for ARM and PPC architecture
- support for cross-compilation
- fixed Berkeley DB support
- changed folder structure of libetpan package
- can now add a message to a mailbox with flags
- support for hotmail mailboxes (with help of hotwayd)
- added Berkeley DB mail storage as experimental
- added support for PGP and S/MIME
- better folder API
2003-12-16 - libetpan-0.32 - hoa
libEtPan! - a mail library
* release 0.32 - Black Utopia
* general
- added documentation for IMF / tools
- bugfixes in IMAP module due to structures change.
- Application that use libEtPan! now have to use
'#include <libetpan/libetpan.h>'
* generic
- get_message() is implemented in Maildir cached driver.
2003-12-10 - libEtPan! version 0.31
libEtPan! - a mail library
* release 0.31 - Steve Morse release
* general
- all fields name of structures are changed.
- bugfixes.
- union {} are added everywhere it is possible to save memory.
- support for Berkeley DB 1.
- improved compatibility with FreeBSD and Mac OS X.
* drivers
- cache drivers are disable if Berkeley DB is not found.
- disable search call.
- support of buggy Courier-IMAP server.
- semantic of mailsession_get_envelopes_list() changed : it
does no more remove messages from the list.
- mailsession_get_message_by_uid() is added and implemented
in some drivers.
2003-11-21 - libEtPan! version 0.30
libEtPan! - a mail library
* release 0.30 - Spock's Beard release
* main new features
- cache for drivers is cleaned up.
- maildir driver.
* general
- fixed several memory leaks.
- defines now exist for new features since version 0.29
* tools
- dump of network traffic is now possible by setting
exported variable mailstream_debug to 1.
- TLS/SSL driver for stream is fixed.
* imf
- fixed RFC 2822 format, wrap headers and break lines
when they are longer than requirement (998).
- reduced size of headers data.
a union is used inside the structure.
*** WARNING *** : this change use of structure field as a union
member is used in mailimf_field structure.
* imap
- several fixes in IMAP module.
* mime
- fixed quoted-printable parser.
* generic - cache for drivers
- cache database is now cleaned up.
- fixed header fields cache.
*** WARNING *** cache format changed. You should reset all
your cache of headers (env.db).
* generic - threading
- fixed threading when threading by references with subject.
* generic - drivers for message
- separated flush() and check() in message.
*** WARNING *** : this changes the API of the message.
flush() is used to free the internal structure used
to store the MIME structure of the message. It invalidates
the "mime" member of the message.
check() is used for to notify the modification of message
flags to the session, so that the session saves the flags
of the message at the next call of mailsession_check() or
when leaving the session.
- IMAP implementation is more compliant.
- added driver to build MIME message and see the rendering
through fetch functions.
- added driver to parse message content given with a string.
* generic - drivers for maildir
- maildir driver for storage / session / messages
is implemented.
* 2003-10-06 - libEtPan! version 0.29
libEtPan! - a mail library
* XetPan release
* debug for stream, network timeout
* SSL library is initialized by SSL stream driver
* fixed messages threading
* added SMTP authentication CRAM-MD5, LOGIN, PLAIN
* added example of use of SMTP
* 2003-04-01 - libEtPan! version 0.28
libEtPan! - a mail library
* Avril Lavigne Release
* fixed IMAP parser
* access to network protocols with a command
* pop3 driver can try APOP authentication and fallback on clear
authentication
* 2002-12-18 - libEtPan! version 0.27
libEtPan! - a mail library
* Christmas release ^^ //clindoeil
* helper interface for IMF (RFC 2822) and MIME
* changed interface for mail threading so that a default
charset can be set.
*** this means that mail threading INTERFACE CHANGED ***
* API documentation in code
* flags directory and cache directory can be different.
*** this means that storage INTERFACE CHANGED ***
* 2002-09-02 - libEtPan! version 0.26
libEtPan! - a mail library
* flags for all cache drivers
* flags stored on disk use Berkeley DB
* mailmessage, session and storage interface are separated
*** this means that generic INTERFACE CHANGED ***
* fixes various bugs and memory leaks
etpan - a console mail client
* available on CVS
* virtual folder (using storage interface) is used
* folder list view / message list view / message view
* we can poll for status of mailboxes
* got rid of expat
* uses new interface of libEtPan!
* 2002-06-26 - libEtPan! version 0.25
libEtPan! - a mail library
* BSD licence
* portability tested on Solaris, FreeBSD, IRIX and Linux
* implementation of messages threads
* MIME message generator
* drivers are implemented for IMAP4rev1, POP3, NNTP, MH, mbox
in both cached and non-cached version.
etpan - a console mail client
* a small mail client not distributed has been implemented
written in ncurses
featuring :
- MIME message editor
- IMAP4rev1, POP3, NNTP, MH, mbox access
- renderer (HTML rendering for example)
- retrieving of MIME parts
- messages threads
big missing feature :
- removing messages is not yet possible

+ 0
- 0
README View File


+ 94
- 0
autogen.sh View File

@ -0,0 +1,94 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
# name of the current package
PKG_NAME=`basename \`(cd $srcdir; pwd)\``
# default configure options
conf_flags="--enable-debug --with-debug"
DIE=0
libtool=0
gettext=0
run_automake=0
libtoolize=libtoolize
if which glibtoolize >/dev/null 2>&1 ; then
libtoolize=glibtoolize
fi
missing() {
echo
echo "**Error**: You must have \`$1' installed to compile $PKG_NAME."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(aclocal --version) < /dev/null > /dev/null 2>&1 || missing aclocal
(autoconf --version) < /dev/null > /dev/null 2>&1 || missing autoconf
grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && gettext=1
grep "^AC_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null && libtool=1
grep "^AM_INIT_AUTOMAKE" $srcdir/configure.ac >/dev/null && run_automake=1
if test "$gettext" -eq 1; then
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
(gettextize --version) < /dev/null > /dev/null 2>&1 || missing gettext
fi
if test "$libtool" -eq 1; then
($libtoolize --version) < /dev/null > /dev/null 2>&1 || missing libtool
fi
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with default arguments."
echo "If you wish to pass any others to it, please specify them on the"
echo \`$0\'" command line."
echo
else
unset conf_flags
fi
echo "Running aclocal..."
aclocal -I m4
if test "$gettext" -eq 1; then
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy
fi
if test "$libtool" -eq 1; then
echo "Running libtoolize..."
$libtoolize --force --copy
fi
echo "Running autoheader..."
autoheader
echo "Running autoconf ..."
autoconf
if test "$run_automake" -eq 1; then
echo "Running automake..."
automake --add-missing --foreign --force --copy
fi
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME
else
echo Skipping configure process.
fi
#if which jade >/dev/null; then
# echo "Generate documentation ..."
# (cd doc && make doc)
#fi

+ 26
- 0
build-mac/Info.plist View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.etpan.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

+ 2
- 0
build-mac/README View File

@ -0,0 +1,2 @@
run ./update.sh to bootstrap project for Mac OS X and iPhone OS.

+ 3308
- 0
build-mac/libetpan.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 23
- 0
build-mac/update.sh View File

@ -0,0 +1,23 @@
#!/bin/sh
OPENSSL_VERSION=0.9.8l
if test ! -d libetpan.xcodeproj ; then
exit 1;
fi
cd ..
./autogen.sh
make stamp-prepare-target
make libetpan-config.h
cd build-mac
mkdir -p include/libetpan
cp -r ../include/libetpan/ include/libetpan/
cp ../config.h include
cp ../libetpan-config.h include
rm -rf OpenSSL
mkdir -p OpenSSL
cd OpenSSL
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar xzvf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION/* .
rm -rf openssl-$OPENSSL_VERSION

+ 35
- 0
build-windows/Makefile.am View File

@ -0,0 +1,35 @@
# libEtPan! -- a mail stuff library
#
# Copyright (C) 2007 g10 Code GmbH
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the libEtPan! project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
include $(top_srcdir)/rules.mk
EXTRA_DIST = libetpan/libetpan.vcproj README.txt StdAfx.h \
build_headers.bat build_headers.list libetpan-config.h \
libetpan.sln libetpan_version.h readmsg/readmsg.vcproj \
smtpsend/smtpsend.vcproj

+ 73
- 0
build-windows/README.txt View File

@ -0,0 +1,73 @@
libEtPan!
_________________________________________________________________
Windows Build:
This folder contains the suff needed for the Windows build.
_________________________________________________________________
Build a version:
1. Open libetpan.sln with VC++ 7.1
2. Choose configuration Debug or Release
3. Build Solution
This will generate libetpan.dll and readmsg.exe and the include/libetpan
folder. This folder, in combinaition with libetpan.lib, is needed for your
Windows applications using the libetpan.dll.
_________________________________________________________________
Build a SSL version:
1. Open libetpan.sln with VC++ 7.1
2. Choose configuration Debug_ssl or Release_ssl
3. create two folders on same level of libetpan folder
- 3include : contains openssl/ folder with all its includes
- 3lib : contains openssl/ folder with the four build files (Win32)
- openssl/libcrypto.lib
- openssl/libeay32.dll
- openssl/libssl.lib
- openssl/ssleay32.dll
4. Build Solution
This will generate libetpan.dll and readmsg.exe and the include/libetpan
folder. This folder, in combinaition with libetpan.lib, is needed for your
Windows applications using the libetpan.dll.
_________________________________________________________________
Copy of headers:
The include folder is build by build_headers.bat, the dependence is not based on headers
files themselves, but on a fake file, genarated after the .bat was executed (_headers_depends).
So, if you modify original headers (in src), you need to remove this file to refresh the
includes copy folder.
_________________________________________________________________
Supported drivers:
pop3
imap
nntp
_________________________________________________________________
TODO :
- support mmap
- support dirent
- support Berkeley DB cache
_________________________________________________________________

+ 4
- 0
build-windows/StdAfx.h View File

@ -0,0 +1,4 @@
#include "libetpan-config.h"

+ 4
- 0
build-windows/build_headers.bat View File

@ -0,0 +1,4 @@
@mkdir include
@mkdir include\libetpan
@for /F "eol=" %%i in (build_headers.list) do @copy "%%i" include\libetpan
@echo "done" >_headers_depends

+ 171
- 0
build-windows/build_headers.list View File

@ -0,0 +1,171 @@
libetpan-config.h
libetpan_version.h
..\src\data-types\base64.h
..\src\data-types\carray.h
..\src\data-types\charconv.h
..\src\data-types\chash.h
..\src\data-types\cinthash.h
..\src\data-types\clist.h
..\src\data-types\connect.h
..\src\data-types\hmac-md5.h
..\src\data-types\mail.h
..\src\data-types\maillock.h
..\src\data-types\mailsasl.h
..\src\data-types\mailsem.h
..\src\data-types\mailstream.h
..\src\data-types\mailstream_helper.h
..\src\data-types\mailstream_low.h
..\src\data-types\mailstream_socket.h
..\src\data-types\mailstream_ssl.h
..\src\data-types\mailstream_types.h
..\src\data-types\mail_cache_db.h
..\src\data-types\mail_cache_db_types.h
..\src\data-types\mapping.h
..\src\data-types\md5.h
..\src\data-types\md5global.h
..\src\data-types\mmapstring.h
..\src\data-types\timeutils.h
..\src\driver\implementation\data-message\data_message_driver.h
..\src\driver\implementation\db\dbdriver.h
..\src\driver\implementation\db\dbdriver_message.h
..\src\driver\implementation\db\dbdriver_types.h
..\src\driver\implementation\db\dbstorage.h
..\src\driver\implementation\feed\feeddriver.h
..\src\driver\implementation\feed\feeddriver_message.h
..\src\driver\implementation\feed\feeddriver_types.h
..\src\driver\implementation\feed\feedstorage.h
..\src\driver\implementation\hotmail\hotmailstorage.h
..\src\driver\implementation\imap\imapdriver.h
..\src\driver\implementation\imap\imapdriver_cached.h
..\src\driver\implementation\imap\imapdriver_cached_message.h
..\src\driver\implementation\imap\imapdriver_message.h
..\src\driver\implementation\imap\imapdriver_tools.h
..\src\driver\implementation\imap\imapdriver_types.h
..\src\driver\implementation\imap\imapstorage.h
..\src\driver\implementation\maildir\maildirdriver.h
..\src\driver\implementation\maildir\maildirdriver_cached.h
..\src\driver\implementation\maildir\maildirdriver_cached_message.h
..\src\driver\implementation\maildir\maildirdriver_message.h
..\src\driver\implementation\maildir\maildirdriver_tools.h
..\src\driver\implementation\maildir\maildirdriver_types.h
..\src\driver\implementation\maildir\maildirstorage.h
..\src\driver\implementation\mbox\mboxdriver.h
..\src\driver\implementation\mbox\mboxdriver_cached.h
..\src\driver\implementation\mbox\mboxdriver_cached_message.h
..\src\driver\implementation\mbox\mboxdriver_message.h
..\src\driver\implementation\mbox\mboxdriver_tools.h
..\src\driver\implementation\mbox\mboxdriver_types.h
..\src\driver\implementation\mbox\mboxstorage.h
..\src\driver\implementation\mh\mhdriver.h
..\src\driver\implementation\mh\mhdriver_cached.h
..\src\driver\implementation\mh\mhdriver_cached_message.h
..\src\driver\implementation\mh\mhdriver_message.h
..\src\driver\implementation\mh\mhdriver_tools.h
..\src\driver\implementation\mh\mhdriver_types.h
..\src\driver\implementation\mh\mhstorage.h
..\src\driver\implementation\mime-message\mime_message_driver.h
..\src\driver\implementation\nntp\nntpdriver.h
..\src\driver\implementation\nntp\nntpdriver_cached.h
..\src\driver\implementation\nntp\nntpdriver_cached_message.h
..\src\driver\implementation\nntp\nntpdriver_message.h
..\src\driver\implementation\nntp\nntpdriver_tools.h
..\src\driver\implementation\nntp\nntpdriver_types.h
..\src\driver\implementation\nntp\nntpstorage.h
..\src\driver\implementation\pop3\pop3driver.h
..\src\driver\implementation\pop3\pop3driver_cached.h
..\src\driver\implementation\pop3\pop3driver_cached_message.h
..\src\driver\implementation\pop3\pop3driver_message.h
..\src\driver\implementation\pop3\pop3driver_tools.h
..\src\driver\implementation\pop3\pop3driver_types.h
..\src\driver\implementation\pop3\pop3storage.h
..\src\driver\interface\maildriver.h
..\src\driver\interface\maildriver_errors.h
..\src\driver\interface\maildriver_tools.h
..\src\driver\interface\maildriver_types.h
..\src\driver\interface\maildriver_types_helper.h
..\src\driver\interface\mailfolder.h
..\src\driver\interface\mailmessage.h
..\src\driver\interface\mailmessage_tools.h
..\src\driver\interface\mailmessage_types.h
..\src\driver\interface\mailstorage.h
..\src\driver\interface\mailstorage_tools.h
..\src\driver\interface\mailstorage_types.h
..\src\driver\tools\generic_cache.h
..\src\driver\tools\generic_cache_types.h
..\src\driver\tools\imfcache.h
..\src\driver\tools\mailthread.h
..\src\driver\tools\mailthread_types.h
..\src\engine\mailengine.h
..\src\engine\mailprivacy.h
..\src\engine\mailprivacy_gnupg.h
..\src\engine\mailprivacy_smime.h
..\src\engine\mailprivacy_tools.h
..\src\engine\mailprivacy_types.h
..\src\low-level\feed\newsfeed.h
..\src\low-level\feed\newsfeed_item.h
..\src\low-level\feed\newsfeed_item_enclosure.h
..\src\low-level\feed\newsfeed_types.h
..\src\low-level\imap\idle.h
..\src\low-level\imap\mailimap.h
..\src\low-level\imap\mailimap_helper.h
..\src\low-level\imap\mailimap_keywords.h
..\src\low-level\imap\mailimap_parser.h
..\src\low-level\imap\mailimap_print.h
..\src\low-level\imap\mailimap_sender.h
..\src\low-level\imap\mailimap_socket.h
..\src\low-level\imap\mailimap_ssl.h
..\src\low-level\imap\mailimap_types.h
..\src\low-level\imap\mailimap_types_helper.h
..\src\low-level\imap\mailimap_extension.h
..\src\low-level\imap\mailimap_extension_types.h
..\src\low-level\imap\annotatemore.h
..\src\low-level\imap\annotatemore_parser.h
..\src\low-level\imap\annotatemore_sender.h
..\src\low-level\imap\annotatemore_types.h
..\src\low-level\imap\acl.h
..\src\low-level\imap\acl_parser.h
..\src\low-level\imap\acl_types.h
..\src\low-level\imap\acl_sender.h
..\src\low-level\imap\uidplus.h
..\src\low-level\imap\uidplus_parser.h
..\src\low-level\imap\uidplus_sender.h
..\src\low-level\imap\uidplus_types.h
..\src\low-level\imf\mailimf.h
..\src\low-level\imf\mailimf_types.h
..\src\low-level\imf\mailimf_types_helper.h
..\src\low-level\imf\mailimf_write.h
..\src\low-level\imf\mailimf_write_file.h
..\src\low-level\imf\mailimf_write_generic.h
..\src\low-level\imf\mailimf_write_mem.h
..\src\low-level\maildir\maildir.h
..\src\low-level\maildir\maildir_types.h
..\src\low-level\mbox\mailmbox.h
..\src\low-level\mbox\mailmbox_parse.h
..\src\low-level\mbox\mailmbox_types.h
..\src\low-level\mh\mailmh.h
..\src\low-level\mime\mailmime.h
..\src\low-level\mime\mailmime_content.h
..\src\low-level\mime\mailmime_decode.h
..\src\low-level\mime\mailmime_disposition.h
..\src\low-level\mime\mailmime_types.h
..\src\low-level\mime\mailmime_types_helper.h
..\src\low-level\mime\mailmime_write.h
..\src\low-level\mime\mailmime_write_file.h
..\src\low-level\mime\mailmime_write_generic.h
..\src\low-level\mime\mailmime_write_mem.h
..\src\low-level\nntp\newsnntp.h
..\src\low-level\nntp\newsnntp_socket.h
..\src\low-level\nntp\newsnntp_ssl.h
..\src\low-level\nntp\newsnntp_types.h
..\src\low-level\pop3\mailpop3.h
..\src\low-level\pop3\mailpop3_helper.h
..\src\low-level\pop3\mailpop3_socket.h
..\src\low-level\pop3\mailpop3_ssl.h
..\src\low-level\pop3\mailpop3_types.h
..\src\low-level\smtp\mailsmtp.h
..\src\low-level\smtp\mailsmtp_helper.h
..\src\low-level\smtp\mailsmtp_socket.h
..\src\low-level\smtp\mailsmtp_ssl.h
..\src\low-level\smtp\mailsmtp_types.h
..\src\main\libetpan.h
..\src\windows\win_etpan.h

+ 86
- 0
build-windows/libetpan-config.h View File

@ -0,0 +1,86 @@
#ifndef LIBETPAN_CONFIG_H
#define LIBETPAN_CONFIG_H
#ifdef WIN32
# define PATH_MAX 512
// Windows API security level
# define SECURITY_WIN32
# ifdef __cplusplus
# define PropVariantInit __inline PropVariantInit
# pragma warning( push )
# pragma warning( disable : 4005 4141 )
# endif
# include <tchar.h>
# include <stdio.h>
# include <string.h>
# include <io.h>
# include <Winsock2.h>
# ifdef __cplusplus
# pragma warning( pop )
# undef PropVariantInit
# endif
# if !defined(snprintf)
# define snprintf _snprintf
# endif
# if !defined(strncasecmp)
# define strncasecmp _strnicmp
# endif
# if !defined(strcasecmp)
# define strcasecmp _stricmp
# endif
/* use Windows Types */
# if !defined(ssize_t)
typedef SSIZE_T ssize_t;
# endif
# if !defined(uint16_t)
typedef UINT16 uint16_t;
# endif
# if !defined(uint32_t)
typedef UINT32 uint32_t;
# endif
# if !defined(int32_t)
typedef INT32 int32_t;
# endif
# if !defined(pid_t)
typedef DWORD pid_t;
# endif
# if !defined(caddr_t)
typedef void * caddr_t;
# endif
/* avoid config.h*/
# define CONFIG_H
#endif // WIN32
#include <limits.h>
#ifdef _MSC_VER
# define MMAP_UNAVAILABLE
# define inline __inline
#else
# include <sys/param.h>
#endif
#define MAIL_DIR_SEPARATOR '/'
#define MAIL_DIR_SEPARATOR_S "/"
#ifdef _MSC_VER
# ifdef LIBETPAN_DLL
# define LIBETPAN_EXPORT __declspec(dllexport)
# else
# define LIBETPAN_EXPORT __declspec(dllimport)
# endif
#else
# define LIBETPAN_EXPORT
#endif
/* REENTRANT under WINDOWS */
#ifndef LIBETPAN_REENTRANT
# define LIBETPAN_REENTRANT 1
#endif
#endif

+ 48
- 0
build-windows/libetpan.sln View File

@ -0,0 +1,48 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libetpan", "libetpan\libetpan.vcproj", "{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readmsg", "readmsg\readmsg.vcproj", "{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}"
ProjectSection(ProjectDependencies) = postProject
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smtpsend", "smtpsend\smtpsend.vcproj", "{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_ssl|Win32 = Debug_ssl|Win32
Debug|Win32 = Debug|Win32
Release_ssl|Win32 = Release_ssl|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug_ssl|Win32.ActiveCfg = Debug_ssl|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug_ssl|Win32.Build.0 = Debug_ssl|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.ActiveCfg = Debug|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.Build.0 = Debug|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release_ssl|Win32.ActiveCfg = Release_ssl|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release_ssl|Win32.Build.0 = Release_ssl|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.ActiveCfg = Release|Win32
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.Build.0 = Release|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Debug_ssl|Win32.ActiveCfg = Debug|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Debug_ssl|Win32.Build.0 = Debug|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Debug|Win32.ActiveCfg = Debug|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Debug|Win32.Build.0 = Debug|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Release_ssl|Win32.ActiveCfg = Release|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Release_ssl|Win32.Build.0 = Release|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Release|Win32.ActiveCfg = Release|Win32
{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}.Release|Win32.Build.0 = Release|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Debug_ssl|Win32.ActiveCfg = Debug|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Debug_ssl|Win32.Build.0 = Debug|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Debug|Win32.ActiveCfg = Debug|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Debug|Win32.Build.0 = Debug|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Release_ssl|Win32.ActiveCfg = Release|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Release_ssl|Win32.Build.0 = Release|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Release|Win32.ActiveCfg = Release|Win32
{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

+ 1518
- 0
build-windows/libetpan/libetpan.vcproj
File diff suppressed because it is too large
View File


+ 53
- 0
build-windows/libetpan_version.h View File

@ -0,0 +1,53 @@
/*
* libEtPan! -- a mail stuff library
*
* Copyright (C) 2001 - 2003 - DINH Viet Hoa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the libEtPan! project nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef LIBETPAN_VERSION_H
#define LIBETPAN_VERSION_H
#ifndef LIBETPAN_VERSION_MAJOR
#define LIBETPAN_VERSION_MAJOR 1
#endif
#ifndef LIBETPAN_VERSION_MINOR
#define LIBETPAN_VERSION_MINOR 1
#endif
#ifndef LIBETPAN_REENTRANT
#if 1
#define LIBETPAN_REENTRANT 1
#endif
#endif
int libetpan_get_version_major(void);
int libetpan_get_version_minor(void);
#endif

+ 246
- 0
build-windows/readmsg/readmsg.vcproj View File

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="readmsg"
ProjectGUID="{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include/libetpan/;../include;../../src/gnu"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
DisableSpecificWarnings="4996, 4267"
ForcedIncludeFiles="../../StdAfx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libetpan.lib"
OutputFile="../Debug/readmsg.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\Debug"
IgnoreDefaultLibraryNames="C"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/readmsg.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include/libetpan/;../include;../../src/gnu"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="0"
DisableSpecificWarnings="4996, 4267"
ForcedIncludeFiles="../StdAfx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libetpan.lib"
OutputFile="../Release/readmsg.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\Release"
IgnoreDefaultLibraryNames="C"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\bsd\getopt.c"
>
</File>
<File
RelativePath="..\..\src\bsd\getopt_long.c"
>
</File>
<File
RelativePath="..\..\tests\Makefile"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\tests\option-parser.c"
>
</File>
<File
RelativePath="..\..\tests\readmsg-common.c"
>
</File>
<File
RelativePath="..\..\tests\readmsg.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

+ 238
- 0
build-windows/smtpsend/smtpsend.vcproj View File

@ -0,0 +1,238 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="smtpsend"
ProjectGUID="{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include/libetpan/;../include;../../src/gnu"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
DisableSpecificWarnings="4996, 4267"
ForcedIncludeFiles="../../StdAfx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libetpan.lib"
OutputFile="../Debug/smtpsend.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\Debug"
IgnoreDefaultLibraryNames="C"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/smtpsend.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include/libetpan/;../include;../../src/gnu"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="0"
DisableSpecificWarnings="4996, 4267"
ForcedIncludeFiles="../StdAfx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libetpan.lib"
OutputFile="../Release/smtpsend.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\Release"
IgnoreDefaultLibraryNames="C"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\bsd\getopt.c"
>
</File>
<File
RelativePath="..\..\src\bsd\getopt_long.c"
>
</File>
<File
RelativePath="..\..\tests\Makefile"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\tests\smtpsend.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

+ 690
- 0
configure.ac View File

@ -0,0 +1,690 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
m4_define([maj_version], [1])
m4_define([min_version], [1])
m4_define([api_current], [16])
m4_define([api_revision], [0])
m4_define([api_compatibility], [16])
dnl API version
dnl 1. If you have changed any of the sources for this library, the revision
dnl number must be incremented. This is a new revision of the current
dnl interface.
dnl 2. If the interface has changed, then current must be incremented, and
dnl revision reset to `0'. This is the first revision of a new interface.
dnl 3. If the new interface is a superset of the previous interface (that is,
dnl if the previous interface has not been broken by the changes in this new
dnl release), then age must be incremented. This release is backwards
dnl compatible with the previous release.
dnl 4. If the new interface has removed elements with respect to the previous
dnl interface, then you have broken backward compatibility and age must be
dnl reset to `0'. This release has a new, but backwards incompatible
dnl interface.
dnl age = api_current - api_compatiblity
AC_PREREQ(2.61)
AC_INIT([libetpan],[maj_version.min_version],[libetpan-devel@lists.sourceforge.net])
AC_CONFIG_SRCDIR([src/main/libetpan_version.h.in])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl Version major and minor
VERSION_MAJOR=maj_version
VERSION_MINOR=min_version
dnl required version of libcurl
libcurl_major_required=0
libcurl_minor_required=0
dnl API version
dnl 1. If you have changed any of the sources for this library, the revision
dnl number must be incremented. This is a new revision of the current
dnl interface.
dnl 2. If the interface has changed, then current must be incremented, and
dnl revision reset to `0'. This is the first revision of a new interface.
dnl 3. If the new interface is a superset of the previous interface (that is,
dnl if the previous interface has not been broken by the changes in this new
dnl release), then age must be incremented. This release is backwards
dnl compatible with the previous release.
dnl 4. If the new interface has removed elements with respect to the previous
dnl interface, then you have broken backward compatibility and age must be
dnl reset to `0'. This release has a new, but backwards incompatible
dnl interface.
API_CURRENT=api_current
API_REVISION=api_revision
API_COMPATIBILITY=api_compatibility
AC_SUBST(API_CURRENT)
AC_SUBST(API_COMPATIBILITY)
AC_SUBST(API_REVISION)
API_AGE=`expr $API_CURRENT - $API_COMPATIBILITY`
API_VERSION="$API_CURRENT:$API_REVISION:$API_AGE"
AC_SUBST(API_VERSION)
dnl FIXME: This should be the CVS revision.
BUILD_REVISION=0
AC_SUBST(BUILD_REVISION)
BUILD_TIMESTAMP=`date +'%Y-%m-%dT%H:%M%z'`
AC_SUBST(BUILD_TIMESTAMP)
changequote(,)dnl
BUILD_FILEVERSION=`echo "${VERSION_MAJOR}.${VERSION_MINOR}.0" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
changequote([,])dnl
BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_REVISION}"
AC_SUBST(BUILD_FILEVERSION)
# Architecture specific.
have_w32_system=no
case "${host}" in
*-mingw32*)
have_w32_system=yes
CFLAGS="$CFLAGS -mms-bitfields -I\${top_srcdir}/src/windows"
## Currently we export all symbols indiscriminately.
## Eventually, this can be limited to those which should be
## exported (which helps to hide our internal mmap stubs, for
## example), but before this can happen, the missing export
## declarations have to be added to all header files. Also, it
## should first be verified that exporting data members from a
## DLL is safe. To reenable discriminate exports, uncomment
## the following line and replace the "@ifdef _MSC_VER" around the
## export/import declaration stuff in libetpan.h.in by
## "@if WIN32".
# CFLAGS="$CFLAGS -DLIBETPAN_DLL"
# We use winsock2.
LIBS="$LIBS -lws2_32"
;;
*)
;;
esac
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_MINGW32_SYSTEM, 1, [Defined if we run on a W32 API based system])
fi
AM_CONDITIONAL(HAVE_MINGW32_SYSTEM, test "$have_w32_system" = yes)
# Check the C compiler.
AC_PROG_CC
AC_PROG_CXX
# Compiler flags.
AC_ARG_ENABLE(debug, [ --enable-debug setup flags (gcc) for debugging (default=no)],
if test "x$enable_debug" = xyes; then
CFLAGS="$CFLAGS -O2 -g"
fi
CPPFLAGS="$CPPFLAGS -DDEBUG"
LDFLAGS="$LDFLAGS",)
AC_ARG_ENABLE(optim, [ --enable-optim setup flags (gcc) for optimizations (default=no)],
if test "x$enable_debug" != "xyes" ; then
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -O2 -ffast-math -funroll-loops -g0"
fi
CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS -s"
else
AC_MSG_WARN([enable-optim and enable-debug are incompatible -- disabling optimizations])
fi,)
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -W -Wall"
fi
AC_ARG_ENABLE(syntax, [ --enable-unstrict-syntax be lazy on syntax checking for protocols (default=no)], , [AC_DEFINE(UNSTRICT_SYNTAX, 1, [Define to be lazy on protocol syntax])])
AH_VERBATIM([CONFIG_H_FIRST], [/* Check for Linux's /usr/include/features.h
*/
#ifdef _FEATURES_H
# error config.h must be first file included
#endif])
AC_C_INLINE
# Checks for programs.
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
AC_PROG_LIBTOOL
AC_PROG_MKDIR_P
dnl Can't use AC_PROG_INSTALL
INSTALL='$(SHELL) $(top_srcdir)/install-sh -c'
AC_SUBST(INSTALL)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h sys/types.h sys/stat.h sys/mman.h limits.h)
AC_CHECK_HEADERS(netdb.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(sys/param.h sys/select.h inttypes.h)
AC_CHECK_HEADERS(arpa/inet.h winsock2.h)
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_MMAP
dnl Network libs
AC_CHECK_FUNC(connect, checksocket=no, checksocket=yes)
if test "x$checksocket" = "xyes"; then
case "x$LIBS" in
*-lsocket*);;
*) AC_CHECK_LIB(socket, connect) ;;
esac
fi
AC_CHECK_FUNC(inet_ntoa, checknsl=no, checknsl=yes)
if test "x$checknsl" = "xyes"; then
case "x$LIBS" in
*-lnsl*);;
*) AC_CHECK_LIB(nsl, inet_ntoa) ;;
esac
fi
AC_CHECK_FUNC(setenv, AC_DEFINE(HAVE_SETENV, 1, [Define to use setenv]),)
# Check for getopt_long; if not found, use included source.
AC_CHECK_FUNCS([getopt_long], has_getopt_long=no, has_getopt_long=yes)
if test "x$has_getoptlong" = "xyes"; then
AC_DEFINE([HAVE_GETOPT_LONG], 1, [Define to use getopt_long])
fi
dnl OpenSSL -- very primitive right now
AC_ARG_WITH(openssl, [ --with-openssl[=DIR] include OpenSSL support (default=auto)],
[], [with_openssl=yes])
if test "x$with_openssl" != "xno"; then
OCPPFLAGS="$CPPFLAGS"
OLDFLAGS="$LDFLAGS"
if test "x$with_openssl" != "xyes" ; then
CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
LDFLAGS="$LDFLAGS -L$with_openssl/lib"
fi
with_openssl=no
SSLLIBS=""
AC_CHECK_HEADER(openssl/ssl.h, [
AC_CHECK_LIB(rsaref, main, [SSLLIBS="-lrsaref"])
AC_CHECK_LIB(crypto, main, [SSLLIBS="-lcrypto $SSLLIBS"], [], [$SSLLIBS])
AC_CHECK_LIB(ssl, SSL_library_init, with_openssl=yes, [], [$SSLLIBS])])
if test "x$with_openssl" != "xyes"; then
CPPFLAGS="$OCPPFLAGS"
LDFLAGS="$OLDFLAGS"
else
with_gnutls="no"
fi
fi
if test "x$with_openssl" = "xyes"; then
AC_DEFINE([USE_SSL], 1, [Define to use OpenSSL])
SSLLIBS="-lssl $SSLLIBS"
else
SSLLIBS=""
fi
AC_SUBST(SSLLIBS)
dnl GNUTLS
AC_ARG_WITH(gnutls, [ --with-gnutls[=DIR] include GnuTLS support (default=auto)],
[], [with_gnutls=no])
if test "x$with_gnutls" != "xno"; then
OCPPFLAGS="$CPPFLAGS"
OLDFLAGS="$LDFLAGS"
if test "x$with_gnutls" != "xyes" ; then
CPPFLAGS="CPPFLAGS -I$with_gnutls/include"
LDFLAGS="$LDFLAGS -L$with_gnutls/lib"
fi
GNUTLSLIB=""
AC_CHECK_HEADER(gnutls/gnutls.h, [
AC_CHECK_LIB(gnutls, gnutls_global_deinit, with_gnutls=yes, [GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"])
])
if test "x$with_gnutls" != "xyes"; then
CPPFLAGS="$OCPPFLAGS"
LDFLAGS="$OLDFLAGS"
else
with_openssl="no"
fi
fi
if test "x$with_gnutls" = "xyes"; then
AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
AC_DEFINE([USE_SSL], 1, [Define to use OpenSSL])
GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"
else
GNUTLSLIB=""
fi
AC_SUBST(GNUTLSLIB)
if test "x$with_openssl" = "xno"; then
if test "x$with_gnutls" = "xno"; then
AC_MSG_WARN([OpenSSL support disabled.])
fi
fi
dnl iconv
LIBICONV=""
AC_ARG_ENABLE(iconv,
[ --disable-iconv make a version not using iconv],
enable_iconv=no, enable_iconv=yes)
if test x$enable_iconv = xyes; then
dnl get prototype
AC_CHECK_HEADER(iconv.h, [ICONV_HEADER=1], [ICONV_HEADER=0])
ICONV_PROTO=no
AC_MSG_CHECKING([checking iconv() prototype])
if test "x$ICONV_HEADER" = x1 ; then
SAVED_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-std=c99 $CPPFLAGS"
AC_TRY_COMPILE([#include <iconv.h>
size_t iconv (iconv_t cd, char ** restrict inbuf,
size_t * restrict inbytesleft,
char ** restrict outbuf,
size_t * restrict outbytesleft);],
[],
[ICONV_PROTO=noconst]
[])
AC_TRY_COMPILE([#include <iconv.h>
size_t iconv (iconv_t cd, const char ** restrict inbuf,
size_t * restrict inbytesleft,
char ** restrict outbuf,
size_t * restrict outbytesleft);],
[],
[ICONV_PROTO=const]
[])
CPPFLAGS="$SAVED_CPPFLAGS"
fi
dnl try to link
ICONV_LINKED=NO
if test "$ICONV_PROTO" != "xno" ; then
AC_MSG_RESULT([ok])
AC_MSG_CHECKING([for iconv])
ICONV_LINKED=0
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
[ICONV_LINKED=1],
[])
saved_LIBS="$LIBS"
for lib in iconv ; do
if test "x$ICONV_LINKED" = "x0" ; then
LIBS=-l$lib
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
[LIBICONV="$LIBS" ; ICONV_LINKED=1],
[])
fi
done
LIBS="$saved_LIBS"
if test "x$ICONV_LINKED" = "x1" ; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
fi
else
AC_MSG_RESULT([failed])
fi
if test "x$ICONV_LINKED" = "x1" ; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
ICONV_PROTO_CONST=0
if test "x$ICONV_PROTO" = "xconst" ; then
AC_DEFINE_UNQUOTED(HAVE_ICONV_PROTO_CONST, 1,
[prototype of iconv() has const parameters])
fi
fi
AC_SUBST(LIBICONV)
dnl Berkeley DB
DBVERS=0
DBLINKED=0
DBLIB=""
AC_ARG_ENABLE(db, [ --disable-db disable Berkeley DB (default=try to detect DB)],[enable_db=$enableval],[enable_db=yes])
dnl Check for a presence of Berkeley DB header
if test "x$enable_db" != "xyes"; then
AC_MSG_WARN(cache support disabled)
else
AC_CHECK_HEADER(db.h, [DB_HEADER=1], [DB_HEADER=0])
fi
if test "x$DB_HEADER" = "x1"; then
dnl Check for version of Berkeley DB
AC_MSG_CHECKING([version of Berkeley DB])
dnl check for version 3 and above
AC_TRY_COMPILE(
[#include <db.h>],
[#if DB_VERSION_MAJOR < 3
#error DB version 3 or above needed
#endif],
[DBVERS=3]
[])
dnl check for version 2
if test "x$DBVERS" = "x0"; then
AC_TRY_COMPILE([#include <db.h>],
[#if DB_VERSION_MAJOR != 2
#error DB version 2 needed
#endif],
[DBVERS=2]
[])
fi
if test "x$DBVERS" = "x0"; then
dnl assume version 1
DBVERS=1
fi
dnl test linkage with Berkeley DB
dnl Look for db3 or superior with db_create call
case "$DBVERS" in
3)
AC_MSG_RESULT([version 3.x or above])
for lib in db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db-3.2 db-3 db3 db; do
if test "x$DBLINKED" = "x0"; then
dnl AC_CHECK_LIB($lib, db_create, [DBLIB="-l$lib"; DBLINKED=1], [])
dnl installations of libdb4 function names are defined in db.h
dnl to other symbols
AC_MSG_CHECKING([for db_create() in -l$lib])
LIBS=-l$lib
AC_TRY_LINK(
[#include <db.h>],
[db_create(0,0,0)],
[DBLIB="-l$lib"; DBLINKED=1; AC_MSG_RESULT([found])],
[AC_MSG_RESULT([not found])])